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

Side by Side Diff: ui/views/widget/desktop_aura/x11_desktop_handler.h

Issue 137533006: Call XSetInputFocus after XRaiseWindow when activating. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_
7 7
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. 9 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class.
10 #undef RootWindow 10 #undef RootWindow
(...skipping 11 matching lines...) Expand all
22 // A singleton that owns global objects related to the desktop and listens for 22 // A singleton that owns global objects related to the desktop and listens for
23 // X11 events on the X11 root window. Destroys itself when aura::Env is 23 // X11 events on the X11 root window. Destroys itself when aura::Env is
24 // deleted. 24 // deleted.
25 class VIEWS_EXPORT X11DesktopHandler : public base::MessageLoop::Dispatcher, 25 class VIEWS_EXPORT X11DesktopHandler : public base::MessageLoop::Dispatcher,
26 public aura::EnvObserver { 26 public aura::EnvObserver {
27 public: 27 public:
28 // Returns the singleton handler. 28 // Returns the singleton handler.
29 static X11DesktopHandler* get(); 29 static X11DesktopHandler* get();
30 30
31 // Sends a request to the window manager to activate |window|. 31 // Sends a request to the window manager to activate |window|.
32 // This method should only be called if the window is already mapped.
32 void ActivateWindow(::Window window); 33 void ActivateWindow(::Window window);
33 34
34 // Checks if the current active window is |window|. 35 // Checks if the current active window is |window|.
35 bool IsActiveWindow(::Window window) const; 36 bool IsActiveWindow(::Window window) const;
36 37
37 // Processes activation/focus related events. Some of these events are 38 // Processes activation/focus related events. Some of these events are
38 // dispatched to the X11 window dispatcher, and not to the X11 root-window 39 // dispatched to the X11 window dispatcher, and not to the X11 root-window
39 // dispatcher. The window dispatcher sends these events to here. 40 // dispatcher. The window dispatcher sends these events to here.
40 void ProcessXEvent(const base::NativeEvent& event); 41 void ProcessXEvent(const base::NativeEvent& event);
41 42
(...skipping 23 matching lines...) Expand all
65 ui::X11AtomCache atom_cache_; 66 ui::X11AtomCache atom_cache_;
66 67
67 bool wm_supports_active_window_; 68 bool wm_supports_active_window_;
68 69
69 DISALLOW_COPY_AND_ASSIGN(X11DesktopHandler); 70 DISALLOW_COPY_AND_ASSIGN(X11DesktopHandler);
70 }; 71 };
71 72
72 } // namespace views 73 } // namespace views
73 74
74 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_ 75 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_DESKTOP_HANDLER_H_
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc ('k') | ui/views/widget/desktop_aura/x11_desktop_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698