set the desktop hint when the window already has a hint but its out of range
This commit is contained in:
parent
0423b057ed
commit
da24f9156b
1 changed files with 6 additions and 3 deletions
|
@ -587,12 +587,13 @@ static void client_get_area(Client *self)
|
||||||
|
|
||||||
static void client_get_desktop(Client *self)
|
static void client_get_desktop(Client *self)
|
||||||
{
|
{
|
||||||
guint32 d;
|
guint32 d = screen_num_desktops; /* an always-invalid value */
|
||||||
|
|
||||||
if (PROP_GET32(self->window, net_wm_desktop, cardinal, &d)) {
|
if (PROP_GET32(self->window, net_wm_desktop, cardinal, &d)) {
|
||||||
if (d >= screen_num_desktops && d != DESKTOP_ALL)
|
if (d >= screen_num_desktops && d != DESKTOP_ALL)
|
||||||
d = screen_num_desktops - 1;
|
self->desktop = screen_num_desktops - 1;
|
||||||
self->desktop = d;
|
else
|
||||||
|
self->desktop = d;
|
||||||
} else {
|
} else {
|
||||||
gboolean trdesk = FALSE;
|
gboolean trdesk = FALSE;
|
||||||
|
|
||||||
|
@ -616,6 +617,8 @@ static void client_get_desktop(Client *self)
|
||||||
/* defaults to the current desktop */
|
/* defaults to the current desktop */
|
||||||
self->desktop = screen_desktop;
|
self->desktop = screen_desktop;
|
||||||
|
|
||||||
|
}
|
||||||
|
if (self->desktop != d) {
|
||||||
/* set the desktop hint, to make sure that it always exists */
|
/* set the desktop hint, to make sure that it always exists */
|
||||||
PROP_SET32(self->window, net_wm_desktop, cardinal, self->desktop);
|
PROP_SET32(self->window, net_wm_desktop, cardinal, self->desktop);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue