diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-30 03:28:07 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-30 03:28:07 +0000 |
| commit | 496c185f997fddf052c230b156f551da770e78ca (patch) | |
| tree | 1768f18d222f1898b80d45b10e141003464e01a7 /src | |
| parent | 1c61a333db13c70c679b0b4bbb4f1b7cdb26cb8f (diff) | |
dont shade without a titlebar.
more correct configurenotifies
Diffstat (limited to 'src')
| -rw-r--r-- | src/client.cc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/client.cc b/src/client.cc index 82a2d5e2..8e00198a 100644 --- a/src/client.cc +++ b/src/client.cc @@ -309,6 +309,10 @@ void Client::setupDecorAndFunctions() if (_disabled_decorations & Decor_Close) _decorations &= ~Decor_Close; + // You can't shade without a titlebar + if (!(_decorations & Decor_Titlebar)) + _functions &= ~Func_Shade; + changeAllowedActions(); if (frame) { @@ -1142,15 +1146,23 @@ void Client::internal_move(int x, int y) event.xconfigure.display = **otk::display; event.xconfigure.event = _window; event.xconfigure.window = _window; - event.xconfigure.x = x; - event.xconfigure.y = y; + + // root window coords with border in mind + event.xconfigure.x = x - _border_width + frame->size().left; + event.xconfigure.y = y - _border_width + frame->size().top; + event.xconfigure.width = _area.width(); event.xconfigure.height = _area.height(); event.xconfigure.border_width = _border_width; - event.xconfigure.above = frame->window(); + event.xconfigure.above = frame->plate(); event.xconfigure.override_redirect = False; XSendEvent(event.xconfigure.display, event.xconfigure.window, False, StructureNotifyMask, &event); +#if 0//def DEBUG + printf("Sent synthetic ConfigureNotify %d,%d %d,%d to 0x%lx\n", + event.xconfigure.x, event.xconfigure.y, event.xconfigure.width, + event.xconfigure.height, event.xconfigure.window); +#endif } } |
