mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
x11: Minor refactor of input focus handling code
Instead of open coding the X11 focus management in display.c, expose it as a single function with similar arguments to its MetaDisplay counterpart. This just means less X11 specifics in display.c. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/751
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
31df06d94e
commit
6922f0e16a
@ -1372,23 +1372,8 @@ meta_display_set_input_focus (MetaDisplay *display,
|
||||
|
||||
if (display->x11_display)
|
||||
{
|
||||
MetaX11Display *x11_display = display->x11_display;
|
||||
Window xwindow;
|
||||
gulong serial;
|
||||
|
||||
meta_x11_error_trap_push (x11_display);
|
||||
|
||||
if (window)
|
||||
xwindow = focus_frame ? window->frame->xwindow : window->xwindow;
|
||||
else
|
||||
xwindow = x11_display->no_focus_window;
|
||||
|
||||
meta_x11_display_set_input_focus (x11_display, xwindow, timestamp);
|
||||
serial = XNextRequest (x11_display->xdisplay);
|
||||
|
||||
meta_x11_display_update_focus_window (x11_display, xwindow, serial, TRUE);
|
||||
|
||||
meta_x11_error_trap_pop (display->x11_display);
|
||||
meta_x11_display_set_input_focus (display->x11_display, window,
|
||||
focus_frame, timestamp);
|
||||
}
|
||||
|
||||
meta_display_update_focus_window (display, window);
|
||||
|
Reference in New Issue
Block a user