summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrbuj <[email protected]>2022-02-01 10:00:24 +0100
committerraveit65 <[email protected]>2022-02-19 22:03:32 +0100
commit480cc60e3b3596a7fa8e196a08974b6086217bf0 (patch)
treef0bcb8ba9aed09d76a2cace2661259f3e42c00c3 /src
parent936a0bdea9b651ad705552600779502dfec91127 (diff)
downloadmarco-480cc60e3b3596a7fa8e196a08974b6086217bf0.tar.bz2
marco-480cc60e3b3596a7fa8e196a08974b6086217bf0.tar.xz
keybindings: fix build warning -Wbad-function-cast
Diffstat (limited to 'src')
-rw-r--r--src/core/keybindings.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index 64db48b8..2f782fa3 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -2073,7 +2073,7 @@ process_tab_grab (MetaDisplay *display,
gboolean popup_not_showing;
enum { NEXT, PREV, UP, DOWN, LEFT, RIGHT } direction;
gboolean key_used;
- Window prev_xwindow;
+ MetaTabEntryKey key;
MetaWindow *prev_window;
if (screen != display->grab_screen)
@@ -2085,13 +2085,11 @@ process_tab_grab (MetaDisplay *display,
end_keyboard_grab (display, event->xkey.keycode))
{
/* We're done, move to the new window. */
- Window target_xwindow;
MetaWindow *target_window;
- target_xwindow =
- (Window) meta_ui_tab_popup_get_selected (screen->tab_popup);
+ key = meta_ui_tab_popup_get_selected (screen->tab_popup);
target_window =
- meta_display_lookup_x_window (display, target_xwindow);
+ meta_display_lookup_x_window (display, (Window) key);
meta_topic (META_DEBUG_KEYBINDINGS,
"Ending tab operation, primary modifier released\n");
@@ -2129,8 +2127,8 @@ process_tab_grab (MetaDisplay *display,
if (is_modifier (display, event->xkey.keycode))
return TRUE;
- prev_xwindow = (Window) meta_ui_tab_popup_get_selected (screen->tab_popup);
- prev_window = meta_display_lookup_x_window (display, prev_xwindow);
+ key = meta_ui_tab_popup_get_selected (screen->tab_popup);
+ prev_window = meta_display_lookup_x_window (display, (Window) key);
action = display_get_keybinding_action (display,
keysym,
event->xkey.keycode,
@@ -2295,16 +2293,14 @@ process_tab_grab (MetaDisplay *display,
/* We can't actually change window focus, due to the grab.
* but raise the window.
*/
- Window target_xwindow;
MetaWindow *target_window;
meta_stack_set_positions (screen->stack,
display->grab_old_window_stacking);
- target_xwindow =
- (Window) meta_ui_tab_popup_get_selected (screen->tab_popup);
+ key = meta_ui_tab_popup_get_selected (screen->tab_popup);
target_window =
- meta_display_lookup_x_window (display, target_xwindow);
+ meta_display_lookup_x_window (display, (Window) key);
if (prev_window && prev_window->tab_unminimized)
{