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

Side by Side Diff: ui/aura/monitor_change_observer_x11.h

Issue 9808010: Keep the mouse cursor within desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_AURA_MONITOR_CHANGE_OBSERVER_H
6 #define UI_AURA_MONITOR_CHANGE_OBSERVER_H
7 #pragma once
8
9 #include <X11/Xlib.h>
10
11 // Xlib.h defines RootWindow.
12 #undef RootWindow
13
14 #include "base/basictypes.h"
15 #include "ui/aura/aura_export.h"
16
17 namespace aura {
18
19 // An object that observes changes in monitor configuration and
20 // update MonitorManagers.
21 class AURA_EXPORT MonitorChangeObserverX11 {
22 public:
23 MonitorChangeObserverX11();
24 ~MonitorChangeObserverX11();
25
26 bool Dispatch(const XEvent* event);
27
28 // Reads monitor configurations from the system and notifies
29 // |monitor_manager_| about the change.
30 void NotifyMonitorChange();
31
32 private:
33 Display* xdisplay_;
34
35 ::Window x_root_window_;
36
37 int xrandr_event_base_;
38
39 DISALLOW_COPY_AND_ASSIGN(MonitorChangeObserverX11);
40 };
41
42 } // namespace aura
43
44 #endif // UI_AURA_MONITOR_CHANGE_OBSERVER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698