X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fclient.cc;h=83ee5b9a22e379a15652929ae607e82547e93e22;hb=edd539420796233d3f69e1cceaa0f491ffdb5c6a;hp=3cd41d72fce2d4b89afe613d2bd43663cc9359d2;hpb=0571837e50a15b61be008b55973f0ada069d4f77;p=chaz%2Fopenbox diff --git a/src/client.cc b/src/client.cc index 3cd41d72..83ee5b9a 100644 --- a/src/client.cc +++ b/src/client.cc @@ -58,8 +58,8 @@ Client::Client(int screen, Window window) getDesktop(); updateTransientFor(); - getType(); getMwmHints(); + getType(); // this can change the mwmhints for special cases getState(); getShaped(); @@ -188,9 +188,12 @@ void Client::getType() _type = Type_Dialog; else if (val[i] == otk::Property::atoms.net_wm_window_type_normal) _type = Type_Normal; -// XXX: make this work again -// else if (val[i] == otk::Property::atoms.kde_net_wm_window_type_override) -// mwm_decorations = 0; // prevent this window from getting any decor + else if (val[i] == otk::Property::atoms.kde_net_wm_window_type_override){ + // prevent this window from getting any decor or functionality + _mwmhints.flags &= MwmFlag_Functions | MwmFlag_Decorations; + _mwmhints.decorations = 0; + _mwmhints.functions = 0; + } if (_type != (WindowType) -1) break; // grab the first known type } @@ -481,9 +484,6 @@ void Client::updateNormalHints() _min_size.setPoint(0, 0); _max_size.setPoint(INT_MAX, INT_MAX); - // XXX: might want to cancel any interactive resizing of the window at this - // point.. - // get the hints from the window if (XGetWMNormalHints(**otk::display, _window, &size, &ret)) { _positioned = (size.flags & (PPosition|USPosition)); @@ -679,8 +679,6 @@ void Client::updateTransientFor() _transient_for = c; if (_transient_for) _transient_for->_transients.push_back(this); // add to new parent - - // XXX: change decor status? } } @@ -841,7 +839,6 @@ void Client::setState(StateAction action, long data1, long data2) } else if (state == otk::Property::atoms.net_wm_state_maximized_horz) { if (_max_horz) continue; maxh = true; - // XXX: resize the window etc } else if (state == otk::Property::atoms.net_wm_state_shaded) { shadestate = true; } else if (state == otk::Property::atoms.net_wm_state_skip_taskbar) { @@ -1551,6 +1548,13 @@ void Client::disableDecorations(DecorationFlags flags) } +bool Client::focusModalChild() +{ + // XXX: find a modal child recursively and try focus it + return false; +} + + bool Client::focus() { // won't try focus if the client doesn't want it, or if the window isn't @@ -1559,6 +1563,10 @@ bool Client::focus() if (_focused) return true; + if (_modal) + if (focusModalChild()) + return true; + // do a check to see if the window has already been unmapped or destroyed // do this intelligently while watching out for unmaps we've generated // (ignore_unmaps > 0)