diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-09-17 21:40:36 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-09-17 21:40:36 +0200 |
commit | 852d80fee35bc55460c6a8ab3775f64653f67089 (patch) | |
tree | 6793c6956e65eea968284bd7485bb27de3cf1d7f /source | |
parent | ff4946edaffbfc65d31a15db6536f5260629a9e5 (diff) |
Change WMQuirk logic
- Default is switch to desktop then select window.
- 2 quirks:
- pango names.
- do not switch.
Diffstat (limited to 'source')
-rw-r--r-- | source/dialogs/window.c | 4 | ||||
-rw-r--r-- | source/xcb.c | 13 |
2 files changed, 4 insertions, 13 deletions
diff --git a/source/dialogs/window.c b/source/dialogs/window.c index 517af5f5..bc215795 100644 --- a/source/dialogs/window.c +++ b/source/dialogs/window.c @@ -482,7 +482,7 @@ static void _window_mode_load_data ( Mode *sw, unsigned int cd ) } if ( c->wmdesktop != 0xFFFFFFFF ) { if ( has_names ) { - if ( current_window_manager == WM_I3 ) { + if ( (current_window_manager&WM_PANGO_WORKSPACE_NAMES) == WM_PANGO_WORKSPACE_NAMES ) { char *output = NULL; if ( pango_parse_markup ( _window_name_list_entry ( names.strings, names.strings_len, c->wmdesktop ), -1, 0, NULL, &output, NULL, NULL ) ) { @@ -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 | WM_XFWM4 ) ) != 0 ) { + if ( ( current_window_manager&WM_DO_NOT_CHANGE_CURRENT_DESKTOP ) == 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 db41ec70..25a36820 100644 --- a/source/xcb.c +++ b/source/xcb.c @@ -64,7 +64,7 @@ #include <rofi.h> /** Checks if the if x and y is inside rectangle. */ #define INTERSECT( x, y, x1, y1, w1, h1 ) ( ( ( ( x ) >= ( x1 ) ) && ( ( x ) < ( x1 + w1 ) ) ) && ( ( ( y ) >= ( y1 ) ) && ( ( y ) < ( y1 + h1 ) ) ) ) -WindowManager current_window_manager = WM_EWHM; +WindowManagerQuirk current_window_manager = WM_EWHM; /** * Structure holding xcb objects needed to function. @@ -912,16 +912,7 @@ static void x11_helper_discover_window_manager ( void ) if ( wtitle.strings_len > 0 ) { g_debug ( "Found window manager: %s", wtitle.strings ); if ( g_strcmp0 ( wtitle.strings, "i3" ) == 0 ) { - current_window_manager = WM_I3; - } - else if ( g_strcmp0 ( wtitle.strings, "awesome" ) == 0 ) { - current_window_manager = WM_AWESOME; - } - 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; + current_window_manager = WM_DO_NOT_CHANGE_CURRENT_DESKTOP|WM_PANGO_WORKSPACE_NAMES; } } xcb_ewmh_get_utf8_strings_reply_wipe ( &wtitle ); |