mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
compositor: Add an API to focus the stage X window
gnome-shell has traditionally just called XSetInputFocus when wanting to set the input focus to the stage window, but this might cause strange, hard-to-reproduce bugs because of an interference with mutter's focus prediction. Add API to allow gnome-shell to focus the stage window that also updates mutter's internal focus prediction state. https://bugzilla.gnome.org/show_bug.cgi?id=700735
This commit is contained in:
@ -465,4 +465,9 @@ gboolean meta_display_process_barrier_event (MetaDisplay *display,
|
||||
XIBarrierEvent *event);
|
||||
#endif /* HAVE_XI23 */
|
||||
|
||||
void meta_display_set_input_focus_xwindow (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
Window window,
|
||||
guint32 timestamp);
|
||||
|
||||
#endif
|
||||
|
@ -5806,6 +5806,18 @@ meta_display_request_take_focus (MetaDisplay *display,
|
||||
timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
meta_display_set_input_focus_xwindow (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
Window window,
|
||||
guint32 timestamp)
|
||||
{
|
||||
request_xserver_input_focus_change (display,
|
||||
screen,
|
||||
window,
|
||||
timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
meta_display_focus_the_no_focus_window (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
|
Reference in New Issue
Block a user