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

Unified Diff: ui/aura/desktop_host_linux.cc

Issue 8597010: Send fake event when event_type is set to exit menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use xdisplay_ Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/desktop_host.h ('k') | ui/aura/desktop_host_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/desktop_host_linux.cc
diff --git a/ui/aura/desktop_host_linux.cc b/ui/aura/desktop_host_linux.cc
index e20b1c57403bbeba3bf1b7d9e8b18aaec46642fc..2de31e68518240eb3f72ad280935cb2d5cedc885 100644
--- a/ui/aura/desktop_host_linux.cc
+++ b/ui/aura/desktop_host_linux.cc
@@ -240,6 +240,7 @@ class DesktopHostLinux : public DesktopHost {
virtual void SetSize(const gfx::Size& size) OVERRIDE;
virtual void SetCursor(gfx::NativeCursor cursor_type) OVERRIDE;
virtual gfx::Point QueryMouseLocation() OVERRIDE;
+ virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE;
// Returns true if there's an X window manager present... in most cases. Some
// window managers (notably, ion3) don't implement enough of ICCCM for us to
@@ -481,6 +482,15 @@ gfx::Point DesktopHostLinux::QueryMouseLocation() {
max(0, min(size_.height(), win_y_return)));
}
+void DesktopHostLinux::PostNativeEvent(const base::NativeEvent& native_event) {
+ DCHECK(xwindow_);
+ DCHECK(xdisplay_);
+ XEvent xevent = *native_event;
+ xevent.xany.display = xdisplay_;
+ xevent.xany.window = xwindow_;
+ ::XPutBackEvent(xdisplay_, &xevent);
+}
+
bool DesktopHostLinux::IsWindowManagerPresent() {
// Per ICCCM 2.8, "Manager Selections", window managers should take ownership
// of WM_Sn selections (where n is a screen number).
« no previous file with comments | « ui/aura/desktop_host.h ('k') | ui/aura/desktop_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698