diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-07-05 21:30:29 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-07-05 21:30:29 +0200 |
commit | ef4a171fcaebd6d1a006b4f312b85abd575fd561 (patch) | |
tree | c35c8e2e093d1e9cfda8b1e04c284a9a542a7660 | |
parent | 46cff2d919003f8083bd0db52324dacdc1d44bef (diff) |
Put Xfwm4 on the WM list that needs extra desktop change.
Work-around that makes sure desktop gets switchs when setting active
window.
Fixes: #624
-rw-r--r-- | include/xcb.h | 4 | ||||
-rw-r--r-- | source/dialogs/window.c | 2 | ||||
-rw-r--r-- | source/xcb.c | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/include/xcb.h b/include/xcb.h index 94f14c3d..97803333 100644 --- a/include/xcb.h +++ b/include/xcb.h @@ -174,7 +174,9 @@ typedef enum /** Awesome window manager */ WM_AWESOME = 2, /** Openbox window manager */ - WM_OPENBOX = 4 + WM_OPENBOX = 4, + /** Xfwm4 */ + WM_XFWM4 = 8, } WindowManager; /** diff --git a/source/dialogs/window.c b/source/dialogs/window.c index 9b037573..517af5f5 100644 --- a/source/dialogs/window.c +++ b/source/dialogs/window.c @@ -584,7 +584,7 @@ static ModeMode window_mode_result ( Mode *sw, int mretv, G_GNUC_UNUSED char **i } else { rofi_view_hide (); - if ( ( current_window_manager & ( WM_AWESOME | WM_OPENBOX ) ) != 0 ) { + if ( ( current_window_manager & ( WM_AWESOME | WM_OPENBOX | WM_XFWM4 ) ) != 0 ) { // Get the desktop of the client to switch to uint32_t wmdesktop = 0; xcb_get_property_cookie_t cookie; diff --git a/source/xcb.c b/source/xcb.c index 03af399c..c0fe2402 100644 --- a/source/xcb.c +++ b/source/xcb.c @@ -885,6 +885,9 @@ static void x11_helper_discover_window_manager ( void ) else if ( g_strcmp0 ( wtitle.strings, "Openbox" ) == 0 ) { current_window_manager = WM_OPENBOX; } + else if ( g_strcmp0 ( wtitle.strings, "Xfwm4" ) == 0 ) { + current_window_manager = WM_XFWM4; + } } xcb_ewmh_get_utf8_strings_reply_wipe ( &wtitle ); } |