From 92537091003a9e259abff98e648e58c63a201bc1 Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 21 Jan 2007 18:45:32 +0000 Subject: don't move window frame when closing tab with non-northwest gravity, just the client --- ChangeLog | 2 ++ src/Window.cc | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e5f6d4b..4b3acd9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ (Format: Year/Month/Day) Changes for 1.0rc3: *07/01/21: + * Little fix for closing tabs with non-default gravity (Mark) + Window.cc * Several fixes for menu behavior (Mark) - always give focus to the menu with the highlighted item - revert focus to menu when no other windows will take it diff --git a/src/Window.cc b/src/Window.cc index 642a76b..4bfa452 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -3724,8 +3724,10 @@ void FluxboxWindow::restore(WinClient *client, bool remap) { XChangeSaveSet(display, client->window(), SetModeDelete); client->setEventMask(NoEventMask); - int wx = frame().x(), wy = frame().y(); // not actually used here - frame().gravityTranslate(wx, wy, -client->gravity(), client->old_bw, true); // negative to invert + int wx = frame().x(), wy = frame().y(); + // 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?), // since it would reparent when going fullscreen. @@ -3744,7 +3746,7 @@ void FluxboxWindow::restore(WinClient *client, bool remap) { #endif // DEBUG // reparent to root window - client->reparent(screen().rootWindow(), frame().x(), frame().y(), false); + client->reparent(screen().rootWindow(), wx, wy, false); if (!remap) client->hide(); -- cgit v0.11.2