X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fclient.cc;h=27d89c077e7f0be41268cf0c579d94843d7d8696;hb=312db4ca9ac0b3b488236404230e13e24d01d40a;hp=b36ba9aff2a6fe9bdf701b5f1de4f848b7396f56;hpb=d9d2e7a5094d6d9a9764a68b76de77f2864e4f06;p=chaz%2Fopenbox diff --git a/src/client.cc b/src/client.cc index b36ba9af..27d89c07 100644 --- a/src/client.cc +++ b/src/client.cc @@ -170,7 +170,7 @@ void Client::setupDecorAndFunctions() { // start with everything (cept fullscreen) _decorations = Decor_Titlebar | Decor_Handle | Decor_Border | - Decor_Iconify | Decor_Maximize; + Decor_AllDesktops | Decor_Iconify | Decor_Maximize; _functions = Func_Resize | Func_Move | Func_Iconify | Func_Maximize | Func_Shade; @@ -655,6 +655,8 @@ void Client::setDesktop(long target) frame->show(); else frame->hide(); + + frame->adjustState(); } @@ -1072,6 +1074,9 @@ void Client::changeState() otk::Property::atoms.atom, netstate, num); calcLayer(); + + if (frame) + frame->adjustState(); } @@ -1196,6 +1201,14 @@ bool Client::focus() const if (_focused) return true; + // do a check to see if the window has already been unmapped or destroyed + XEvent ev; + if (XCheckTypedWindowEvent(**otk::display, _window, UnmapNotify, &ev) || + XCheckTypedWindowEvent(**otk::display, _window, DestroyNotify, &ev)) { + XPutBackEvent(**otk::display, &ev); + return false; + } + if (_can_focus) XSetInputFocus(**otk::display, _window, RevertToNone, CurrentTime);