From fd9a18daa4f1f4a673c6bf92ad318c9d835f01f1 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 12 May 2003 04:28:46 +0000 Subject: added updateSize so we can notify screen clients that the root window size changed --- src/Screen.cc | 18 ++++++++++++++++-- src/Screen.hh | 8 +++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index bb3bf8f..eb21f99 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.157 2003/05/11 23:44:08 rathnor Exp $ +// $Id: Screen.cc,v 1.158 2003/05/12 04:28:46 fluxgen Exp $ #include "Screen.hh" @@ -53,7 +53,6 @@ #include "WinClient.hh" #include "Subject.hh" - //use GNU extensions #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -525,6 +524,7 @@ BScreen::BScreen(ResourceManager &rm, XErrorHandler old = XSetErrorHandler((XErrorHandler) anotherWMRunning); rootWindow().setEventMask(event_mask); + XSync(disp, False); XSetErrorHandler((XErrorHandler) old); @@ -2467,3 +2467,17 @@ FluxboxWindow* BScreen::useAutoGroupWindow() { return w ? Fluxbox::instance()->searchWindow(w) : 0; } +void BScreen::updateSize() { + rootWindow().updateGeometry(); + + // reconfigure anything that depends on root window size + + if (getToolbar()) + getToolbar()->reconfigure(); + + if (getSlit()) + getSlit()->reconfigure(); + + //!! TODO: should we re-maximize the maximized windows? + +} diff --git a/src/Screen.hh b/src/Screen.hh index 9f72f5b..53ad211 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.93 2003/05/11 17:11:58 fluxgen Exp $ +// $Id: Screen.hh,v 1.94 2003/05/12 04:28:46 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH @@ -290,6 +290,12 @@ public: FluxboxWindow* useAutoGroupWindow(); + /// updates root window size and resizes/reconfigures screen clients + /// that depends on screen size (toolbar, slit) + /// (and maximized windows?) + void updateSize(); + + // notify netizens void updateNetizenCurrentWorkspace(); void updateNetizenWorkspaceCount(); void updateNetizenWindowFocus(); -- cgit v0.11.2