added updateSize so we can notify screen clients that the root window size changed
fluxgen fluxgen
2 files changed,
23 insertions(+),
3 deletions(-)
M
src/Screen.cc
→
src/Screen.cc
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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"@@ -52,7 +52,6 @@ #include "FbMenu.hh"
#include "LayerMenu.hh" #include "WinClient.hh" #include "Subject.hh" - //use GNU extensions #ifndef _GNU_SOURCE@@ -525,6 +524,7 @@ ButtonPressMask | ButtonReleaseMask| SubstructureNotifyMask;
XErrorHandler old = XSetErrorHandler((XErrorHandler) anotherWMRunning); rootWindow().setEventMask(event_mask); + XSync(disp, False); XSetErrorHandler((XErrorHandler) old);@@ -2467,3 +2467,17 @@ auto_group_window = 0;
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? + +}
M
src/Screen.hh
→
src/Screen.hh
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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 @@ // remove? no, items are never removed from their layer until they die
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();