mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-11 13:50:48 -05:00
switch desktop check
This commit is contained in:
parent
092f3bbd03
commit
342b4e865c
1 changed files with 7 additions and 0 deletions
|
@ -774,6 +774,13 @@ void run_switcher(Window root, int mode, int fmode)
|
||||||
int n = menu(root, list, NULL);
|
int n = menu(root, list, NULL);
|
||||||
if (n >= 0 && list[n])
|
if (n >= 0 && list[n])
|
||||||
{
|
{
|
||||||
|
if (mode == ALLWINDOWS)
|
||||||
|
{
|
||||||
|
// TODO: get rid of strtol
|
||||||
|
window_send_message(root, root, netatoms[_NET_CURRENT_DESKTOP], strtol(list[n], NULL, 10)-1,
|
||||||
|
SubstructureNotifyMask | SubstructureRedirectMask);
|
||||||
|
XSync(display, False);
|
||||||
|
}
|
||||||
window_send_message(root, ids->array[n], netatoms[_NET_ACTIVE_WINDOW], 2, // 2 = pager
|
window_send_message(root, ids->array[n], netatoms[_NET_ACTIVE_WINDOW], 2, // 2 = pager
|
||||||
SubstructureNotifyMask | SubstructureRedirectMask);
|
SubstructureNotifyMask | SubstructureRedirectMask);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue