dont use the client's area rect when figuring out where to place it because then when you want to move ti there, it thinks that it is already there! i actually fixed another bug recently that would have affectd this before but now it should work perfect..
This commit is contained in:
parent
e8bac610ad
commit
4c25342316
1 changed files with 9 additions and 4 deletions
|
@ -241,6 +241,7 @@ void client_manage(Window window)
|
||||||
XWMHints *wmhint;
|
XWMHints *wmhint;
|
||||||
gboolean activate = FALSE;
|
gboolean activate = FALSE;
|
||||||
ObAppSettings *settings;
|
ObAppSettings *settings;
|
||||||
|
gint placex, placey;
|
||||||
|
|
||||||
grab_server(TRUE);
|
grab_server(TRUE);
|
||||||
|
|
||||||
|
@ -364,6 +365,10 @@ void client_manage(Window window)
|
||||||
frame_adjust_area(self->frame, FALSE, TRUE, FALSE);
|
frame_adjust_area(self->frame, FALSE, TRUE, FALSE);
|
||||||
frame_adjust_client_area(self->frame);
|
frame_adjust_client_area(self->frame);
|
||||||
|
|
||||||
|
/* where the frame was placed is where the window was originally */
|
||||||
|
placex = self->area.x;
|
||||||
|
placey = self->area.y;
|
||||||
|
|
||||||
/* figure out placement for the window */
|
/* figure out placement for the window */
|
||||||
if (ob_state() == OB_STATE_RUNNING) {
|
if (ob_state() == OB_STATE_RUNNING) {
|
||||||
gboolean transient;
|
gboolean transient;
|
||||||
|
@ -374,10 +379,10 @@ void client_manage(Window window)
|
||||||
(self->positioned == USPosition ? "user specified" :
|
(self->positioned == USPosition ? "user specified" :
|
||||||
"BADNESS !?"))), self->area.x, self->area.y);
|
"BADNESS !?"))), self->area.x, self->area.y);
|
||||||
|
|
||||||
transient = place_client(self, &self->area.x, &self->area.y, settings);
|
transient = place_client(self, &placex, &placey, settings);
|
||||||
|
|
||||||
/* make sure the window is visible. */
|
/* make sure the window is visible. */
|
||||||
client_find_onscreen(self, &self->area.x, &self->area.y,
|
client_find_onscreen(self, &placex, &placey,
|
||||||
self->area.width, self->area.height,
|
self->area.width, self->area.height,
|
||||||
/* non-normal clients has less rules, and
|
/* non-normal clients has less rules, and
|
||||||
windows that are being restored from a
|
windows that are being restored from a
|
||||||
|
@ -397,7 +402,7 @@ void client_manage(Window window)
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_debug("placing window 0x%x at %d, %d with size %d x %d\n",
|
ob_debug("placing window 0x%x at %d, %d with size %d x %d\n",
|
||||||
self->window, self->area.x, self->area.y,
|
self->window, placex, placey,
|
||||||
self->area.width, self->area.height);
|
self->area.width, self->area.height);
|
||||||
if (self->session)
|
if (self->session)
|
||||||
ob_debug(" but session requested %d %d instead, overriding\n",
|
ob_debug(" but session requested %d %d instead, overriding\n",
|
||||||
|
@ -419,7 +424,7 @@ void client_manage(Window window)
|
||||||
will get the right sizes and positions if the client is starting with
|
will get the right sizes and positions if the client is starting with
|
||||||
those states
|
those states
|
||||||
*/
|
*/
|
||||||
client_configure(self, self->area.x, self->area.y,
|
client_configure(self, placex, placey,
|
||||||
self->area.width, self->area.height,
|
self->area.width, self->area.height,
|
||||||
FALSE, TRUE);
|
FALSE, TRUE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue