diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-02-11 16:53:37 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-02-11 16:53:37 +0100 |
commit | c3865215748013b03fbe7ad8ba4a939b38636c0b (patch) | |
tree | 416a1acf33d8ff9fd011efb9a9b74c33a344ccf0 /source/dialogs | |
parent | 98c625feab597454166880b58bfbcb92b1b0f25f (diff) |
Add an window manager detection function to startup.
current_window_manager now is an enum of known window managers.
Diffstat (limited to 'source/dialogs')
-rw-r--r-- | source/dialogs/window.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/source/dialogs/window.c b/source/dialogs/window.c index 5e9d3be3..f427aa2a 100644 --- a/source/dialogs/window.c +++ b/source/dialogs/window.c @@ -99,7 +99,6 @@ typedef struct unsigned int title_len; unsigned int role_len; GRegex *window_regex; - gboolean i3_mode; } ModeModePrivateData; winlist *cache_client = NULL; @@ -397,14 +396,6 @@ static void _window_mode_load_data ( Mode *sw, unsigned int cd ) xcb_window_t wins[100]; xcb_window_t curr_win_id; - // Check if we are in I3 mode. I3 has to be special and allow markup in it window name...... - char *i3_socket_path = window_get_text_prop ( xcb_stuff_get_root_window ( xcb ), netatoms[I3_SOCKET_PATH] ); - if ( i3_socket_path != NULL ) { - g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Detected I3 Window manager running." ); - pd->i3_mode = TRUE; - g_free ( i3_socket_path ); - } - // Create cache x11_cache_create (); @@ -485,7 +476,7 @@ static void _window_mode_load_data ( Mode *sw, unsigned int cd ) } if ( c->wmdesktop != 0xFFFFFFFF ) { if ( has_names ) { - if ( pd->i3_mode ) { + if ( current_window_manager == WM_I3 ) { char *output = NULL; if ( pango_parse_markup ( _window_name_list_entry ( names.strings, names.strings_len, c->wmdesktop ), -1, 0, NULL, &output, NULL, NULL ) ) { |