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

Unified Diff: window_manager.h

Issue 6902072: wm: Update a lot of code to use structs from geometry.h. (Closed) Base URL: ssh://gitrw.chromium.org:9222/window_manager.git@master
Patch Set: move override-redirect stacking and visibility into Window Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
« window.cc ('K') | « window.cc ('k') | window_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: window_manager.h
diff --git a/window_manager.h b/window_manager.h
index e5bc008cbce99c4b9e620438c4eed6686cd733ec..b85ce1c8d7ef76122b4aac6ef95f5607da404c76 100644
--- a/window_manager.h
+++ b/window_manager.h
@@ -97,17 +97,18 @@ class WindowManager : public PanelManagerAreaChangeListener,
FocusManager* focus_manager() { return focus_manager_.get(); }
XWindow root() const { return root_; }
+ const Rect& root_bounds() const { return root_bounds_; }
+ Size root_size() const { return root_bounds_.size(); }
+ int root_depth() const { return root_depth_; }
+ int width() const { return root_bounds_.width; }
+ int height() const { return root_bounds_.height; }
+
const Stacker<XWindow>& stacked_xids() const {
return *(stacked_xids_.get());
}
Compositor::StageActor* stage() { return stage_; }
- int width() const { return width_; }
- int height() const { return height_; }
- int root_depth() const { return root_depth_; }
- Rect bounds() const { return Rect(0, 0, width_, height_); }
-
XWindow wm_xid() const { return wm_xid_; }
XWindow active_window_xid() const { return active_window_xid_; }
@@ -356,10 +357,9 @@ class WindowManager : public PanelManagerAreaChangeListener,
// specified in the Extended Window Manager Hints.
bool SetEwmhGeneralProperties();
- // Set EWMH properties on the root window relating to the current screen
- // size (as stored in |width_| and |height_|): _NET_DESKTOP_GEOMETRY,
- // _NET_DESKTOP_VIEWPORT, and _NET_WORKAREA (by way of calling
- // SetEwmhWorkareaProperty()).
+ // Set EWMH properties on the root window relating to the current screen size:
+ // _NET_DESKTOP_GEOMETRY, _NET_DESKTOP_VIEWPORT, and _NET_WORKAREA (by way of
+ // calling SetEwmhWorkareaProperty()).
bool SetEwmhSizeProperties();
// Set the _NET_WORKAREA property on the root window to the screen area
@@ -387,7 +387,7 @@ class WindowManager : public PanelManagerAreaChangeListener,
void HandleMappedWindow(Window* win);
// Handle the screen being resized.
- void HandleScreenResize(int new_width, int new_height);
+ void HandleScreenResize(const Size& new_size);
// Set the WM_STATE property on a window. Per ICCCM 4.1.3.1, |state| can
// be 0 (WithdrawnState), 1 (NormalState), or 3 (IconicState). Per
@@ -465,9 +465,8 @@ class WindowManager : public PanelManagerAreaChangeListener,
XWindow root_;
- // Root window dimensions and depth.
- int width_;
- int height_;
+ // Root window bounds and depth.
+ Rect root_bounds_;
int root_depth_;
// Offscreen window that we just use for registering as the WM.
« window.cc ('K') | « window.cc ('k') | window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698