X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fclient.cc;h=54afbc9a6d4d0cecf96491c43ec8c701d78a6685;hb=7b7ae097a0d389a35967fdab4ea310effcfc42c2;hp=b36ba9aff2a6fe9bdf701b5f1de4f848b7396f56;hpb=d9d2e7a5094d6d9a9764a68b76de77f2864e4f06;p=chaz%2Fopenbox diff --git a/src/client.cc b/src/client.cc index b36ba9af..54afbc9a 100644 --- a/src/client.cc +++ b/src/client.cc @@ -169,7 +169,7 @@ void Client::getType() void Client::setupDecorAndFunctions() { // start with everything (cept fullscreen) - _decorations = Decor_Titlebar | Decor_Handle | Decor_Border | + _decorations = Decor_Titlebar | Decor_Handle | Decor_Border | Decor_Sticky | 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);