all repos — fluxbox @ 6c710ba3749fede5d9d2914f888498ec54b6ea31

custom fork of the fluxbox windowmanager

fix position init from atom handlers
simonb simonb
commit

6c710ba3749fede5d9d2914f888498ec54b6ea31

parent

a348c95326a21740019a7b9f2894e1b4af1df869

2 files changed, 18 insertions(+), 7 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,8 @@

(Format: Year/Month/Day) Changes for 0.9.12 +*05/01/10: + * Fix position initialisation from apps file (Simon) + Window.cc *05/01/05: * Tidy up initialisation a bit better. Handlers can still use "action" functions (e.g. stick()), but those functions should now check if
M src/Window.ccsrc/Window.cc

@@ -382,6 +382,8 @@

void FluxboxWindow::init() { m_attaching_tab = 0; + // magic to detect if moved by hints + m_old_pos_x = 0; assert(m_client); m_client->m_win = this;

@@ -491,14 +493,10 @@ return;

} Fluxbox::instance()->saveWindowSearchGroup(frame().window().window(), this); - Fluxbox::instance()->attachSignals(*this); /**************************************************/ /* Read state above here, apply state below here. */ /**************************************************/ - - // this window is managed, we are now allowed to modify actual state - m_initialized = true; // update transient infomation m_client->updateTransientInfo();

@@ -519,10 +517,16 @@ decorations.tab = false; //no tab for this window

} - applyDecorations(true); - associateClientWindow(true, wattrib.x, wattrib.y, wattrib.width, wattrib.height); + + Fluxbox::instance()->attachSignals(*this); + + // this window is managed, we are now allowed to modify actual state + m_initialized = true; + + applyDecorations(true); + grabButtons(); restoreAttributes();

@@ -530,7 +534,7 @@

if (m_workspace_number < 0 || m_workspace_number >= screen().getCount()) m_workspace_number = screen().currentWorkspaceID(); - bool place_window = true; + bool place_window = (m_old_pos_x == 0); if (fluxbox.isStartup() || m_client->isTransient() || m_client->normal_hint_flags & (PPosition|USPosition)) {

@@ -1339,6 +1343,10 @@ }

void FluxboxWindow::moveResize(int new_x, int new_y, unsigned int new_width, unsigned int new_height, int gravity) { + + // magic to detect if moved during initialisation + if (!isInitialized()) + m_old_pos_x = 1; if (gravity != ForgetGravity) { frame().gravityTranslate(new_x, new_y, gravity, false);