testing failed, hopefully this is reverting to the right place
This commit is contained in:
parent
3f40d6e762
commit
ac416fd27e
2 changed files with 17 additions and 14 deletions
|
@ -344,6 +344,15 @@ void client_manage(Window window)
|
||||||
|
|
||||||
place_client(self, &x, &y);
|
place_client(self, &x, &y);
|
||||||
|
|
||||||
|
/* make sure the window is visible. */
|
||||||
|
client_find_onscreen(self, &x, &y,
|
||||||
|
self->frame->area.width,
|
||||||
|
self->frame->area.height,
|
||||||
|
/* non-normal clients has less rules, and
|
||||||
|
windows that are being restored from a session
|
||||||
|
do also. we can assume you want it back where
|
||||||
|
you saved it */
|
||||||
|
client_normal(self) && !self->session);
|
||||||
if (x != ox || y != oy)
|
if (x != ox || y != oy)
|
||||||
client_move(self, x, y);
|
client_move(self, x, y);
|
||||||
}
|
}
|
||||||
|
@ -603,8 +612,7 @@ gboolean client_find_onscreen(ObClient *self, gint *x, gint *y, gint w, gint h,
|
||||||
/* XXX watch for xinerama dead areas */
|
/* XXX watch for xinerama dead areas */
|
||||||
/* This makes sure windows aren't entirely outside of the screen so you
|
/* This makes sure windows aren't entirely outside of the screen so you
|
||||||
* can't see them at all */
|
* can't see them at all */
|
||||||
//a = screen_area(self->desktop);
|
a = screen_area(self->desktop);
|
||||||
a = screen_physical_area_monitor(client_monitor(self));
|
|
||||||
if (client_normal(self)) {
|
if (client_normal(self)) {
|
||||||
if (!self->strut.right && *x >= a->x + a->width - 1)
|
if (!self->strut.right && *x >= a->x + a->width - 1)
|
||||||
*x = a->x + a->width - self->frame->area.width;
|
*x = a->x + a->width - self->frame->area.width;
|
||||||
|
@ -619,7 +627,11 @@ gboolean client_find_onscreen(ObClient *self, gint *x, gint *y, gint w, gint h,
|
||||||
/* This here doesn't let windows even a pixel outside the screen,
|
/* This here doesn't let windows even a pixel outside the screen,
|
||||||
* not applied to all windows. Not sure if it's going to stay at all.
|
* not applied to all windows. Not sure if it's going to stay at all.
|
||||||
* I wonder if disabling this will break struts somehow? Let's find out. */
|
* I wonder if disabling this will break struts somehow? Let's find out. */
|
||||||
if (rude) {
|
if (0 && rude) {
|
||||||
|
/* avoid the xinerama monitor divide while we're at it,
|
||||||
|
* remember to fix the placement stuff to avoid it also and
|
||||||
|
* then remove this XXX */
|
||||||
|
a = screen_physical_area_monitor(client_monitor(self));
|
||||||
/* this is ben's MOZILLA BITCHSLAP. "oh ya it fucking feels good.
|
/* this is ben's MOZILLA BITCHSLAP. "oh ya it fucking feels good.
|
||||||
Java can suck it too." */
|
Java can suck it too." */
|
||||||
|
|
||||||
|
|
|
@ -375,13 +375,9 @@ static gboolean place_transient(ObClient *client, gint *x, gint *y)
|
||||||
|
|
||||||
void place_client(ObClient *client, gint *x, gint *y)
|
void place_client(ObClient *client, gint *x, gint *y)
|
||||||
{
|
{
|
||||||
/* non-normal clients has less rules, and windows that are being restored
|
|
||||||
* from a session do also. we can assume you want it back where you
|
|
||||||
* saved it */
|
|
||||||
gint rude = client_normal(client) && !client->session;
|
|
||||||
if (client->positioned)
|
if (client->positioned)
|
||||||
rude = 0;
|
return;
|
||||||
else if (place_transient(client, x, y) ||
|
if (place_transient(client, x, y) ||
|
||||||
((config_place_policy == OB_PLACE_POLICY_MOUSE) ?
|
((config_place_policy == OB_PLACE_POLICY_MOUSE) ?
|
||||||
place_under_mouse(client, x, y) :
|
place_under_mouse(client, x, y) :
|
||||||
place_smart(client, x, y, SMART_FULL) ||
|
place_smart(client, x, y, SMART_FULL) ||
|
||||||
|
@ -393,9 +389,4 @@ void place_client(ObClient *client, gint *x, gint *y)
|
||||||
frame_frame_gravity(client->frame, x, y);
|
frame_frame_gravity(client->frame, x, y);
|
||||||
} else
|
} else
|
||||||
g_assert_not_reached(); /* the last one better succeed */
|
g_assert_not_reached(); /* the last one better succeed */
|
||||||
/* make sure the window is visible. */
|
|
||||||
client_find_onscreen(client, x, y,
|
|
||||||
client->frame->area.width,
|
|
||||||
client->frame->area.height,
|
|
||||||
rude);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue