don't move window frame when closing tab with non-northwest gravity, just the client

This commit is contained in:
markt 2007-01-21 18:45:32 +00:00
parent feb56381d7
commit 9253709100
2 changed files with 7 additions and 3 deletions

View file

@ -1,6 +1,8 @@
(Format: Year/Month/Day) (Format: Year/Month/Day)
Changes for 1.0rc3: Changes for 1.0rc3:
*07/01/21: *07/01/21:
* Little fix for closing tabs with non-default gravity (Mark)
Window.cc
* Several fixes for menu behavior (Mark) * Several fixes for menu behavior (Mark)
- always give focus to the menu with the highlighted item - always give focus to the menu with the highlighted item
- revert focus to menu when no other windows will take it - revert focus to menu when no other windows will take it

View file

@ -3724,8 +3724,10 @@ void FluxboxWindow::restore(WinClient *client, bool remap) {
XChangeSaveSet(display, client->window(), SetModeDelete); XChangeSaveSet(display, client->window(), SetModeDelete);
client->setEventMask(NoEventMask); client->setEventMask(NoEventMask);
int wx = frame().x(), wy = frame().y(); // not actually used here int wx = frame().x(), wy = frame().y();
frame().gravityTranslate(wx, wy, -client->gravity(), client->old_bw, true); // negative to invert // don't move the frame, in case there are other tabs in it
// just set the new coordinates on the reparented window
frame().gravityTranslate(wx, wy, -client->gravity(), client->old_bw, false); // negative to invert
// Why was this hide done? It broke vncviewer (and mplayer?), // Why was this hide done? It broke vncviewer (and mplayer?),
// since it would reparent when going fullscreen. // since it would reparent when going fullscreen.
@ -3744,7 +3746,7 @@ void FluxboxWindow::restore(WinClient *client, bool remap) {
#endif // DEBUG #endif // DEBUG
// reparent to root window // reparent to root window
client->reparent(screen().rootWindow(), frame().x(), frame().y(), false); client->reparent(screen().rootWindow(), wx, wy, false);
if (!remap) if (!remap)
client->hide(); client->hide();