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

Unified Diff: ui/aura/root_window_host_linux.cc

Issue 10279005: Aura on Linux: Make a DesktopScreenX11 to match the windows one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/root_window_host_linux.h ('k') | ui/gfx/screen_aurax11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window_host_linux.cc
diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc
index cb2a5517cc78839c91a3b7356eb61c4cae345f10..51d1013ef804b651b7b96a4c66895179dec4171b 100644
--- a/ui/aura/root_window_host_linux.cc
+++ b/ui/aura/root_window_host_linux.cc
@@ -23,6 +23,7 @@
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/base/touch/touch_factory.h"
#include "ui/base/x/x11_util.h"
+#include "ui/base/view_prop.h"
#include "ui/gfx/compositor/layer.h"
using std::max;
@@ -36,6 +37,8 @@ namespace {
const int kBackMouseButton = 8;
const int kForwardMouseButton = 9;
+const char kRootWindowHostLinuxKey[] = "__AURA_ROOT_WINDOW_HOST_LINUX__";
+
// The events reported for slave devices can have incorrect information for some
// fields. This utility function is used to check for such inconsistencies.
void CheckXEventForConsistency(XEvent* xevent) {
@@ -314,6 +317,8 @@ RootWindowHostLinux::RootWindowHostLinux(const gfx::Rect& bounds)
static_cast<DispatcherLinux*>(Env::GetInstance()->GetDispatcher())->
WindowDispatcherCreated(xwindow_, this);
+ prop_.reset(new ui::ViewProp(xwindow_, kRootWindowHostLinuxKey, this));
+
long event_mask = ButtonPressMask | ButtonReleaseMask | FocusChangeMask |
KeyPressMask | KeyReleaseMask |
EnterWindowMask | LeaveWindowMask |
@@ -806,8 +811,8 @@ RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) {
// static
RootWindowHost* RootWindowHost::GetForAcceleratedWidget(
gfx::AcceleratedWidget accelerated_widget) {
- NOTIMPLEMENTED();
- return NULL; // TODO(erg): implement if necessary or remove this comment.
+ return reinterpret_cast<RootWindowHost*>(
+ ui::ViewProp::GetValue(accelerated_widget, kRootWindowHostLinuxKey));
}
// static
« no previous file with comments | « ui/aura/root_window_host_linux.h ('k') | ui/gfx/screen_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698