X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fclient.cc;h=a427a21e6f63f759da1ffdd69dc3b2d0abcaf507;hb=bc88d310fea71823fb2c61d071ff499579bffaba;hp=3b2a14387df3c88fee792e1674e21689d0ad2b45;hpb=368d981208c7f7d7865faac129160f277eb8d4e7;p=chaz%2Fopenbox diff --git a/src/client.cc b/src/client.cc index 3b2a1438..a427a21e 100644 --- a/src/client.cc +++ b/src/client.cc @@ -754,7 +754,6 @@ void OBClient::setState(StateAction action, long data1, long data2) _above = true; } else if (state == property->atom(otk::OBProperty::net_wm_state_below)) { - printf("Setting below\n"); if (_below) continue; _below = true; } @@ -898,7 +897,6 @@ void OBClient::clientMessageHandler(const XClientMessageEvent &e) } else if (e.message_type == property->atom(otk::OBProperty::net_wm_state)) { // can't compress these #ifdef DEBUG - printf("below=%ld above=%ld\n", property->atom(otk::OBProperty::net_wm_state_below), property->atom(otk::OBProperty::net_wm_state_above)); printf("net_wm_state %s %ld %ld for 0x%lx\n", (e.data.l[0] == 0 ? "Remove" : e.data.l[0] == 1 ? "Add" : e.data.l[0] == 2 ? "Toggle" : "INVALID"), @@ -916,6 +914,9 @@ void OBClient::clientMessageHandler(const XClientMessageEvent &e) #ifdef DEBUG printf("net_active_window for 0x%lx\n", _window); #endif + if (_shaded) + shade(false); + // XXX: deiconify focus(); Openbox::instance->screen(_screen)->restack(true, this); // raise } @@ -1002,8 +1003,26 @@ void OBClient::move(int x, int y) _area.setPos(x, y); // move the frame to be in the requested position - if (frame) // this can be called while mapping, before frame exists + if (frame) { // this can be called while mapping, before frame exists frame->adjustPosition(); + + // send synthetic configure notify (we don't need to if we aren't mapped + // yet) + XEvent event; + event.type = ConfigureNotify; + event.xconfigure.display = otk::OBDisplay::display; + event.xconfigure.event = _window; + event.xconfigure.window = _window; + event.xconfigure.x = x; + event.xconfigure.y = y; + event.xconfigure.width = _area.width(); + event.xconfigure.height = _area.height(); + event.xconfigure.border_width = _border_width; + event.xconfigure.above = frame->window(); + event.xconfigure.override_redirect = False; + XSendEvent(event.xconfigure.display, event.xconfigure.window, False, + StructureNotifyMask, &event); + } } @@ -1030,7 +1049,7 @@ void OBClient::close() ce.xclient.data.l[2] = 0l; ce.xclient.data.l[3] = 0l; ce.xclient.data.l[4] = 0l; - XSendEvent(otk::OBDisplay::display, _window, False, NoEventMask, &ce); + XSendEvent(otk::OBDisplay::display, _window, false, NoEventMask, &ce); }