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

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

Issue 11956019: Merge 173933 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src/
Patch Set: Created 7 years, 11 months 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.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 <strings.h> 7 #include <strings.h>
8 #include <X11/cursorfont.h> 8 #include <X11/cursorfont.h>
9 #include <X11/extensions/Xfixes.h> 9 #include <X11/extensions/Xfixes.h>
10 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 } 588 }
589 589
590 void RootWindowHostLinux::SetCursor(gfx::NativeCursor cursor) { 590 void RootWindowHostLinux::SetCursor(gfx::NativeCursor cursor) {
591 if (cursor == current_cursor_) 591 if (cursor == current_cursor_)
592 return; 592 return;
593 current_cursor_ = cursor; 593 current_cursor_ = cursor;
594 SetCursorInternal(cursor); 594 SetCursorInternal(cursor);
595 } 595 }
596 596
597 bool RootWindowHostLinux::QueryMouseLocation(gfx::Point* location_return) { 597 bool RootWindowHostLinux::QueryMouseLocation(gfx::Point* location_return) {
598 client::CursorClient* cursor_client =
599 client::GetCursorClient(GetRootWindow());
600 if (cursor_client && !cursor_client->IsMouseEventsEnabled()) {
601 *location_return = gfx::Point(0, 0);
602 return false;
603 }
604
598 ::Window root_return, child_return; 605 ::Window root_return, child_return;
599 int root_x_return, root_y_return, win_x_return, win_y_return; 606 int root_x_return, root_y_return, win_x_return, win_y_return;
600 unsigned int mask_return; 607 unsigned int mask_return;
601 XQueryPointer(xdisplay_, 608 XQueryPointer(xdisplay_,
602 xwindow_, 609 xwindow_,
603 &root_return, 610 &root_return,
604 &child_return, 611 &child_return,
605 &root_x_return, &root_y_return, 612 &root_x_return, &root_y_return,
606 &win_x_return, &win_y_return, 613 &win_x_return, &win_y_return,
607 &mask_return); 614 &mask_return);
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 return new RootWindowHostLinux(bounds); 1006 return new RootWindowHostLinux(bounds);
1000 } 1007 }
1001 1008
1002 // static 1009 // static
1003 gfx::Size RootWindowHost::GetNativeScreenSize() { 1010 gfx::Size RootWindowHost::GetNativeScreenSize() {
1004 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay(); 1011 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay();
1005 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); 1012 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
1006 } 1013 }
1007 1014
1008 } // namespace aura 1015 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window_host.h ('k') | ui/aura/root_window_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698