try again. merge r6177-6182 from 3.4-working

This commit is contained in:
Dana Jansens 2007-05-08 22:03:56 +00:00
parent 1e4215c5c6
commit 9782122339
4 changed files with 10 additions and 12 deletions

View file

@ -1351,7 +1351,7 @@ void action_toggle_omnipresent(union ActionData *data)
{ {
client_set_desktop(data->client.any.c, client_set_desktop(data->client.any.c,
data->client.any.c->desktop == DESKTOP_ALL ? data->client.any.c->desktop == DESKTOP_ALL ?
screen_desktop : DESKTOP_ALL, FALSE, FALSE); screen_desktop : DESKTOP_ALL, FALSE);
} }
void action_move_relative_horz(union ActionData *data) void action_move_relative_horz(union ActionData *data)
@ -1515,7 +1515,7 @@ void action_send_to_desktop(union ActionData *data)
if (data->sendto.desk < screen_num_desktops || if (data->sendto.desk < screen_num_desktops ||
data->sendto.desk == DESKTOP_ALL) { data->sendto.desk == DESKTOP_ALL) {
client_set_desktop(c, data->sendto.desk, data->sendto.follow, FALSE); client_set_desktop(c, data->sendto.desk, data->sendto.follow);
if (data->sendto.follow) if (data->sendto.follow)
screen_set_desktop(data->sendto.desk, TRUE); screen_set_desktop(data->sendto.desk, TRUE);
} }
@ -1582,7 +1582,7 @@ void action_send_to_desktop_dir(union ActionData *data)
!data->sendtodir.inter.final || !data->sendtodir.inter.final ||
data->sendtodir.inter.cancel) data->sendtodir.inter.cancel)
{ {
client_set_desktop(c, d, data->sendtodir.follow, FALSE); client_set_desktop(c, d, data->sendtodir.follow);
if (data->sendtodir.follow) if (data->sendtodir.follow)
screen_set_desktop(d, TRUE); screen_set_desktop(d, TRUE);
} }

View file

@ -2813,7 +2813,7 @@ static void client_iconify_recursive(ObClient *self,
if (curdesk && self->desktop != screen_desktop && if (curdesk && self->desktop != screen_desktop &&
self->desktop != DESKTOP_ALL) self->desktop != DESKTOP_ALL)
client_set_desktop(self, screen_desktop, FALSE, FALSE); client_set_desktop(self, screen_desktop, FALSE);
/* this puts it after the current focused window */ /* this puts it after the current focused window */
focus_order_remove(self); focus_order_remove(self);
@ -3031,15 +3031,14 @@ void client_set_desktop_recursive(ObClient *self,
for (it = self->transients; it; it = g_slist_next(it)) for (it = self->transients; it; it = g_slist_next(it))
if (it->data != self) if (it->data != self)
if (client_is_direct_child(self, it->data)) if (client_is_direct_child(self, it->data))
client_set_desktop_recursive(it->data, target, client_set_desktop_recursive(it->data, target, donthide);
donthide, focus_nonintrusive);
} }
void client_set_desktop(ObClient *self, guint target, void client_set_desktop(ObClient *self, guint target,
gboolean donthide) gboolean donthide)
{ {
self = client_search_top_normal_parent(self); self = client_search_top_normal_parent(self);
client_set_desktop_recursive(self, target, donthide, focus_nonintrusive); client_set_desktop_recursive(self, target, donthide);
} }
gboolean client_is_direct_child(ObClient *parent, ObClient *child) gboolean client_is_direct_child(ObClient *parent, ObClient *child)
@ -3381,7 +3380,7 @@ static void client_present(ObClient *self, gboolean here, gboolean raise)
self->desktop != screen_desktop) self->desktop != screen_desktop)
{ {
if (here) if (here)
client_set_desktop(self, screen_desktop, FALSE, FALSE); client_set_desktop(self, screen_desktop, FALSE);
else else
screen_set_desktop(self->desktop, FALSE); screen_set_desktop(self->desktop, FALSE);
} else if (!self->frame->visible) } else if (!self->frame->visible)
@ -3448,7 +3447,6 @@ static void client_bring_helper_windows_recursive(ObClient *self,
self->desktop != desktop && self->desktop != DESKTOP_ALL) self->desktop != desktop && self->desktop != DESKTOP_ALL)
{ {
client_set_desktop(self, desktop, FALSE); client_set_desktop(self, desktop, FALSE);
>>>>>>> .merge-right.r6182
} }
} }

View file

@ -1024,7 +1024,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
if ((unsigned)e->xclient.data.l[0] < screen_num_desktops || if ((unsigned)e->xclient.data.l[0] < screen_num_desktops ||
(unsigned)e->xclient.data.l[0] == DESKTOP_ALL) (unsigned)e->xclient.data.l[0] == DESKTOP_ALL)
client_set_desktop(client, (unsigned)e->xclient.data.l[0], client_set_desktop(client, (unsigned)e->xclient.data.l[0],
FALSE, FALSE); FALSE);
} else if (msgtype == prop_atoms.net_wm_state) { } else if (msgtype == prop_atoms.net_wm_state) {
/* can't compress these */ /* can't compress these */
ob_debug("net_wm_state %s %ld %ld for 0x%lx\n", ob_debug("net_wm_state %s %ld %ld for 0x%lx\n",

View file

@ -438,7 +438,7 @@ void screen_set_num_desktops(guint num)
for (it = client_list; it; it = g_list_next(it)) { for (it = client_list; it; it = g_list_next(it)) {
ObClient *c = it->data; ObClient *c = it->data;
if (c->desktop >= num && c->desktop != DESKTOP_ALL) if (c->desktop >= num && c->desktop != DESKTOP_ALL)
client_set_desktop(c, num - 1, FALSE, FALSE); client_set_desktop(c, num - 1, FALSE);
} }
/* change our struts/area to match (after moving windows) */ /* change our struts/area to match (after moving windows) */
@ -473,7 +473,7 @@ void screen_set_desktop(guint num, gboolean dofocus)
ob_debug("Moving to desktop %d\n", num+1); ob_debug("Moving to desktop %d\n", num+1);
if (moveresize_client) if (moveresize_client)
client_set_desktop(moveresize_client, num, TRUE, FALSE); client_set_desktop(moveresize_client, num, TRUE);
/* show windows before hiding the rest to lessen the enter/leave events */ /* show windows before hiding the rest to lessen the enter/leave events */