diff options
author | Daniel Hahler <git@thequod.de> | 2014-03-02 10:36:00 +0100 |
---|---|---|
committer | Daniel Hahler <git@thequod.de> | 2014-03-02 10:37:58 +0100 |
commit | 1834e25ef345fbe8fe26921c31b4c9f4a36d9723 (patch) | |
tree | cda9c02ddd9c2e6d1d4140c01a6f15c77ddbd1bc /source | |
parent | ea8c9923d5e5eca1d7e9b05e3cc2e559350d86bd (diff) |
Select the target desktop in non-i3_mode
Fixes https://github.com/DaveDavenport/rofi/issues/28
This is merged from the original upstream at:
https://github.com/seanpringle/simpleswitcher/blob/master/simpleswitcher.c
(including the TODO)
Diffstat (limited to 'source')
-rw-r--r-- | source/simpleswitcher.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/simpleswitcher.c b/source/simpleswitcher.c index fe232c87..aa56dea8 100644 --- a/source/simpleswitcher.c +++ b/source/simpleswitcher.c @@ -1245,6 +1245,12 @@ SwitcherMode run_switcher_window ( char **input ) } else #endif { + // Change to the desktop of the selected window/client. + // TODO: get rid of strtol + window_send_message(root, root, netatoms[_NET_CURRENT_DESKTOP], strtol(list[selected_line], NULL, 10)-1, + SubstructureNotifyMask | SubstructureRedirectMask, time); + XSync(display, False); + window_send_message( root, ids->array[selected_line], netatoms[_NET_ACTIVE_WINDOW], 2, // 2 = pager SubstructureNotifyMask | SubstructureRedirectMask, time ); } |