| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <X11/extensions/shape.h> | 10 #include <X11/extensions/shape.h> |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 // window size to the monitor size causes the WM to set the EWMH for | 178 // window size to the monitor size causes the WM to set the EWMH for |
| 179 // fullscreen. | 179 // fullscreen. |
| 180 gfx::Size AdjustSize(const gfx::Size& requested_size); | 180 gfx::Size AdjustSize(const gfx::Size& requested_size); |
| 181 | 181 |
| 182 // Called when |xwindow_|'s _NET_WM_STATE property is updated. | 182 // Called when |xwindow_|'s _NET_WM_STATE property is updated. |
| 183 void OnWMStateUpdated(); | 183 void OnWMStateUpdated(); |
| 184 | 184 |
| 185 // Called when |xwindow_|'s _NET_FRAME_EXTENTS property is updated. | 185 // Called when |xwindow_|'s _NET_FRAME_EXTENTS property is updated. |
| 186 void OnFrameExtentsUpdated(); | 186 void OnFrameExtentsUpdated(); |
| 187 | 187 |
| 188 // Makes a round trip to the X server to get the enclosing workspace for this |
| 189 // window. Returns true iff |workspace_| was changed. |
| 190 bool UpdateWorkspace(); |
| 191 |
| 188 // Updates |xwindow_|'s minimum and maximum size. | 192 // Updates |xwindow_|'s minimum and maximum size. |
| 189 void UpdateMinAndMaxSize(); | 193 void UpdateMinAndMaxSize(); |
| 190 | 194 |
| 191 // Updates |xwindow_|'s _NET_WM_USER_TIME if |xwindow_| is active. | 195 // Updates |xwindow_|'s _NET_WM_USER_TIME if |xwindow_| is active. |
| 192 void UpdateWMUserTime(const ui::PlatformEvent& event); | 196 void UpdateWMUserTime(const ui::PlatformEvent& event); |
| 193 | 197 |
| 194 // Sends a message to the x11 window manager, enabling or disabling the | 198 // Sends a message to the x11 window manager, enabling or disabling the |
| 195 // states |state1| and |state2|. | 199 // states |state1| and |state2|. |
| 196 void SetWMSpecState(bool enabled, ::Atom state1, ::Atom state2); | 200 void SetWMSpecState(bool enabled, ::Atom state1, ::Atom state2); |
| 197 | 201 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 281 |
| 278 // The bounds of our window before we were maximized. | 282 // The bounds of our window before we were maximized. |
| 279 gfx::Rect restored_bounds_in_pixels_; | 283 gfx::Rect restored_bounds_in_pixels_; |
| 280 | 284 |
| 281 // |xwindow_|'s minimum size. | 285 // |xwindow_|'s minimum size. |
| 282 gfx::Size min_size_in_pixels_; | 286 gfx::Size min_size_in_pixels_; |
| 283 | 287 |
| 284 // |xwindow_|'s maximum size. | 288 // |xwindow_|'s maximum size. |
| 285 gfx::Size max_size_in_pixels_; | 289 gfx::Size max_size_in_pixels_; |
| 286 | 290 |
| 291 // The workspace containing |xwindow_|. |
| 292 std::string workspace_; |
| 293 |
| 287 // The window manager state bits. | 294 // The window manager state bits. |
| 288 std::set< ::Atom> window_properties_; | 295 std::set< ::Atom> window_properties_; |
| 289 | 296 |
| 290 // Whether |xwindow_| was requested to be fullscreen via SetFullscreen(). | 297 // Whether |xwindow_| was requested to be fullscreen via SetFullscreen(). |
| 291 bool is_fullscreen_; | 298 bool is_fullscreen_; |
| 292 | 299 |
| 293 // True if the window should stay on top of most other windows. | 300 // True if the window should stay on top of most other windows. |
| 294 bool is_always_on_top_; | 301 bool is_always_on_top_; |
| 295 | 302 |
| 296 // True if the window has title-bar / borders provided by the window manager. | 303 // True if the window has title-bar / borders provided by the window manager. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 base::CancelableCallback<void()> delayed_resize_task_; | 360 base::CancelableCallback<void()> delayed_resize_task_; |
| 354 | 361 |
| 355 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; | 362 base::WeakPtrFactory<DesktopWindowTreeHostX11> close_widget_factory_; |
| 356 | 363 |
| 357 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); | 364 DISALLOW_COPY_AND_ASSIGN(DesktopWindowTreeHostX11); |
| 358 }; | 365 }; |
| 359 | 366 |
| 360 } // namespace views | 367 } // namespace views |
| 361 | 368 |
| 362 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ | 369 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_X11_H_ |
| OLD | NEW |