Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1603)

Side by Side Diff: ui/aura/root_window_host_linux.cc

Issue 11189148: desktop linux aura: Fix event/capture focus after dragging a window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows compile. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/root_window_host_delegate.h ('k') | ui/aura/root_window_host_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_linux.h" 5 #include "ui/aura/root_window_host_linux.h"
6 6
7 #include <X11/cursorfont.h> 7 #include <X11/cursorfont.h>
8 #include <X11/extensions/Xfixes.h> 8 #include <X11/extensions/Xfixes.h>
9 #include <X11/extensions/XInput2.h> 9 #include <X11/extensions/XInput2.h>
10 #include <X11/extensions/Xrandr.h> 10 #include <X11/extensions/Xrandr.h>
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 break; 318 break;
319 } 319 }
320 } // fallthrough 320 } // fallthrough
321 case ButtonRelease: { 321 case ButtonRelease: {
322 ui::MouseEvent mouseev(xev); 322 ui::MouseEvent mouseev(xev);
323 TranslateAndDispatchMouseEvent(&mouseev); 323 TranslateAndDispatchMouseEvent(&mouseev);
324 break; 324 break;
325 } 325 }
326 case FocusOut: 326 case FocusOut:
327 if (xev->xfocus.mode != NotifyGrab) 327 if (xev->xfocus.mode != NotifyGrab)
328 delegate_->OnHostLostCapture(); 328 delegate_->OnHostLostWindowCapture();
329 break; 329 break;
330 case ConfigureNotify: { 330 case ConfigureNotify: {
331 DCHECK_EQ(xwindow_, xev->xconfigure.event); 331 DCHECK_EQ(xwindow_, xev->xconfigure.event);
332 DCHECK_EQ(xwindow_, xev->xconfigure.window); 332 DCHECK_EQ(xwindow_, xev->xconfigure.window);
333 // It's possible that the X window may be resized by some other means 333 // It's possible that the X window may be resized by some other means
334 // than from within aura (e.g. the X window manager can change the 334 // than from within aura (e.g. the X window manager can change the
335 // size). Make sure the root window size is maintained properly. 335 // size). Make sure the root window size is maintained properly.
336 gfx::Rect bounds(xev->xconfigure.x, xev->xconfigure.y, 336 gfx::Rect bounds(xev->xconfigure.x, xev->xconfigure.y,
337 xev->xconfigure.width, xev->xconfigure.height); 337 xev->xconfigure.width, xev->xconfigure.height);
338 bool size_changed = bounds_.size() != bounds.size(); 338 bool size_changed = bounds_.size() != bounds.size();
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 return new RootWindowHostLinux(bounds); 861 return new RootWindowHostLinux(bounds);
862 } 862 }
863 863
864 // static 864 // static
865 gfx::Size RootWindowHost::GetNativeScreenSize() { 865 gfx::Size RootWindowHost::GetNativeScreenSize() {
866 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay(); 866 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay();
867 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); 867 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
868 } 868 }
869 869
870 } // namespace aura 870 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window_host_delegate.h ('k') | ui/aura/root_window_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698