OLD | NEW |
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_DESKTOP_WINDOW_TREE_HOST_X11_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ |
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ |
7 | 7 |
8 #include <X11/extensions/shape.h> | 8 #include <X11/extensions/shape.h> |
9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
10 | 10 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // and dispatched to that host instead. | 187 // and dispatched to that host instead. |
188 void DispatchTouchEvent(ui::TouchEvent* event); | 188 void DispatchTouchEvent(ui::TouchEvent* event); |
189 | 189 |
190 // Resets the window region for the current widget bounds if necessary. | 190 // Resets the window region for the current widget bounds if necessary. |
191 void ResetWindowRegion(); | 191 void ResetWindowRegion(); |
192 | 192 |
193 // Serializes an image to the format used by _NET_WM_ICON. | 193 // Serializes an image to the format used by _NET_WM_ICON. |
194 void SerializeImageRepresentation(const gfx::ImageSkiaRep& rep, | 194 void SerializeImageRepresentation(const gfx::ImageSkiaRep& rep, |
195 std::vector<unsigned long>* data); | 195 std::vector<unsigned long>* data); |
196 | 196 |
| 197 // Returns an 8888 ARGB visual. Can return NULL if there is no matching |
| 198 // visual on this display. |
| 199 Visual* GetARGBVisual(); |
| 200 |
197 // See comment for variable open_windows_. | 201 // See comment for variable open_windows_. |
198 static std::list<XID>& open_windows(); | 202 static std::list<XID>& open_windows(); |
199 | 203 |
200 // Map the window (shows it) taking into account the given |show_state|. | 204 // Map the window (shows it) taking into account the given |show_state|. |
201 void MapWindow(ui::WindowShowState show_state); | 205 void MapWindow(ui::WindowShowState show_state); |
202 | 206 |
| 207 void SetWindowTransparency(); |
| 208 |
203 // ui::PlatformEventDispatcher: | 209 // ui::PlatformEventDispatcher: |
204 virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE; | 210 virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE; |
205 virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE; | 211 virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE; |
206 | 212 |
207 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; | 213 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; |
208 | 214 |
209 // X11 things | 215 // X11 things |
210 // The display and the native X window hosting the root window. | 216 // The display and the native X window hosting the root window. |
211 XDisplay* xdisplay_; | 217 XDisplay* xdisplay_; |
212 ::Window xwindow_; | 218 ::Window xwindow_; |
(...skipping 26 matching lines...) Expand all Loading... |
239 // Local flag for fullscreen state to avoid a state mismatch between | 245 // Local flag for fullscreen state to avoid a state mismatch between |
240 // server and local window_properties_ during app-initiated fullscreen. | 246 // server and local window_properties_ during app-initiated fullscreen. |
241 bool is_fullscreen_; | 247 bool is_fullscreen_; |
242 | 248 |
243 // True if the window should stay on top of most other windows. | 249 // True if the window should stay on top of most other windows. |
244 bool is_always_on_top_; | 250 bool is_always_on_top_; |
245 | 251 |
246 // True if the window has title-bar / borders provided by the window manager. | 252 // True if the window has title-bar / borders provided by the window manager. |
247 bool use_native_frame_; | 253 bool use_native_frame_; |
248 | 254 |
| 255 // Whether we used an ARGB visual for our window. |
| 256 bool use_argb_visual_; |
| 257 |
249 scoped_ptr<DesktopDispatcherClient> dispatcher_client_; | 258 scoped_ptr<DesktopDispatcherClient> dispatcher_client_; |
250 | 259 |
251 DesktopDragDropClientAuraX11* drag_drop_client_; | 260 DesktopDragDropClientAuraX11* drag_drop_client_; |
252 | 261 |
253 // Current Aura cursor. | 262 // Current Aura cursor. |
254 gfx::NativeCursor current_cursor_; | 263 gfx::NativeCursor current_cursor_; |
255 | 264 |
256 scoped_ptr<X11WindowEventFilter> x11_window_event_filter_; | 265 scoped_ptr<X11WindowEventFilter> x11_window_event_filter_; |
257 scoped_ptr<X11DesktopWindowMoveClient> x11_window_move_client_; | 266 scoped_ptr<X11DesktopWindowMoveClient> x11_window_move_client_; |
258 | 267 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 // attention to the window or completely ignore the hint. We stop flashing | 303 // attention to the window or completely ignore the hint. We stop flashing |
295 // the frame when |xwindow_| gains focus or handles a mouse button event. | 304 // the frame when |xwindow_| gains focus or handles a mouse button event. |
296 bool urgency_hint_set_; | 305 bool urgency_hint_set_; |
297 | 306 |
298 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); | 307 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); |
299 }; | 308 }; |
300 | 309 |
301 } // namespace views | 310 } // namespace views |
302 | 311 |
303 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ | 312 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ |
OLD | NEW |