Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/aura/root_window_host.h" | 5 #include "ui/aura/root_window_host.h" |
| 6 | 6 |
| 7 #include <X11/cursorfont.h> | 7 #include <X11/cursorfont.h> |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 | 9 |
| 10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. | 10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 420 handled = root_window_->DispatchKeyEvent(&keyup_event); | 420 handled = root_window_->DispatchKeyEvent(&keyup_event); |
| 421 break; | 421 break; |
| 422 } | 422 } |
| 423 case ButtonPress: | 423 case ButtonPress: |
| 424 case ButtonRelease: { | 424 case ButtonRelease: { |
| 425 MouseEvent mouseev(xev); | 425 MouseEvent mouseev(xev); |
| 426 handled = root_window_->DispatchMouseEvent(&mouseev); | 426 handled = root_window_->DispatchMouseEvent(&mouseev); |
| 427 break; | 427 break; |
| 428 } | 428 } |
| 429 case FocusOut: | 429 case FocusOut: |
| 430 /* | |
|
sky
2012/02/15 00:02:04
?
oshima
2012/02/15 00:18:00
I thought i reverted this file. Sorry about that.
| |
| 430 if (xev->xfocus.mode != NotifyGrab) | 431 if (xev->xfocus.mode != NotifyGrab) |
| 431 root_window_->SetCapture(NULL); | 432 root_window_->SetCapture(NULL); |
| 433 */ | |
| 432 break; | 434 break; |
| 433 case ConfigureNotify: { | 435 case ConfigureNotify: { |
| 434 if (xev->xconfigure.window == x_root_window_) { | 436 if (xev->xconfigure.window == x_root_window_) { |
| 435 root_window_->OnNativeScreenResized( | 437 root_window_->OnNativeScreenResized( |
| 436 gfx::Size(xev->xconfigure.width, xev->xconfigure.height)); | 438 gfx::Size(xev->xconfigure.width, xev->xconfigure.height)); |
| 437 handled = true; | 439 handled = true; |
| 438 break; | 440 break; |
| 439 } | 441 } |
| 440 | 442 |
| 441 DCHECK_EQ(xwindow_, xev->xconfigure.window); | 443 DCHECK_EQ(xwindow_, xev->xconfigure.window); |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 722 return new RootWindowHostLinux(bounds); | 724 return new RootWindowHostLinux(bounds); |
| 723 } | 725 } |
| 724 | 726 |
| 725 // static | 727 // static |
| 726 gfx::Size RootWindowHost::GetNativeScreenSize() { | 728 gfx::Size RootWindowHost::GetNativeScreenSize() { |
| 727 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); | 729 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); |
| 728 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); | 730 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); |
| 729 } | 731 } |
| 730 | 732 |
| 731 } // namespace aura | 733 } // namespace aura |
| OLD | NEW |