From 94db19c00720ef65f847ee6f02c12b9d11d5ee02 Mon Sep 17 00:00:00 2001 From: simonb Date: Mon, 19 Jun 2006 23:09:51 +0000 Subject: Fix window placement when apps remembers size but not location --- ChangeLog | 3 +++ src/Window.cc | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7c8a538..46c2fe5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ (Format: Year/Month/Day) Changes for 1.0rc2: +*06/06/20: + * Fix window placement when apps remembers size but not location (Simon) + Window.cc *06/06/19: * Add EUC-KR to ko_KR encodings (Simon) nls/ko_KR/ Makefile.am generated-EUC-KR.m diff --git a/src/Window.cc b/src/Window.cc index 7703f96..32f4dd2 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1288,7 +1288,14 @@ void FluxboxWindow::move(int x, int y, int gravity) { } void FluxboxWindow::resize(unsigned int width, unsigned int height) { + int old_x = m_old_pos_x; + moveResize(frame().x(), frame().y(), width, height); + + // magic to detect if moved during initialisation + // we restore the old state, because we were a resize, not a moveResize! + if (!isInitialized()) + m_old_pos_x = old_x; } // send_event is just an override -- cgit v0.11.2