mirror of
https://github.com/brl/mutter.git
synced 2024-11-13 01:36:10 -05:00
Move request_take_focus to window-x11
This will let us kill off send_icccm_message
This commit is contained in:
parent
ab2224686a
commit
46b4d6c0f0
@ -498,5 +498,7 @@ void meta_display_update_focus_window (MetaDisplay *display,
|
||||
|
||||
void meta_display_sanity_check_timestamps (MetaDisplay *display,
|
||||
guint32 timestamp);
|
||||
gboolean meta_display_timestamp_too_old (MetaDisplay *display,
|
||||
guint32 *timestamp);
|
||||
|
||||
#endif
|
||||
|
@ -1700,9 +1700,9 @@ meta_display_update_focus_window (MetaDisplay *display,
|
||||
meta_display_update_active_window_hint (display);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
timestamp_too_old (MetaDisplay *display,
|
||||
guint32 *timestamp)
|
||||
gboolean
|
||||
meta_display_timestamp_too_old (MetaDisplay *display,
|
||||
guint32 *timestamp)
|
||||
{
|
||||
/* FIXME: If Soeren's suggestion in bug 151984 is implemented, it will allow
|
||||
* us to sanity check the timestamp here and ensure it doesn't correspond to
|
||||
@ -1738,7 +1738,7 @@ request_xserver_input_focus_change (MetaDisplay *display,
|
||||
{
|
||||
gulong serial;
|
||||
|
||||
if (timestamp_too_old (display, ×tamp))
|
||||
if (meta_display_timestamp_too_old (display, ×tamp))
|
||||
return;
|
||||
|
||||
meta_error_trap_push (display);
|
||||
@ -3404,22 +3404,6 @@ meta_display_set_input_focus_window (MetaDisplay *display,
|
||||
timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
meta_display_request_take_focus (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
guint32 timestamp)
|
||||
{
|
||||
if (timestamp_too_old (display, ×tamp))
|
||||
return;
|
||||
|
||||
meta_topic (META_DEBUG_FOCUS, "WM_TAKE_FOCUS(%s, %u)\n",
|
||||
window->desc, timestamp);
|
||||
|
||||
meta_window_send_icccm_message (window,
|
||||
display->atom_WM_TAKE_FOCUS,
|
||||
timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
meta_display_set_input_focus_xwindow (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
|
@ -163,10 +163,6 @@ void meta_display_set_input_focus_window (MetaDisplay *display,
|
||||
gboolean focus_frame,
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_display_request_take_focus (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
guint32 timestamp);
|
||||
|
||||
/* meta_display_focus_the_no_focus_window is called when the
|
||||
* designated no_focus_window should be focused, but is otherwise the
|
||||
* same as meta_display_set_input_focus_window
|
||||
|
@ -386,6 +386,18 @@ meta_window_x11_kill (MetaWindow *window)
|
||||
meta_error_trap_pop (window->display);
|
||||
}
|
||||
|
||||
static void
|
||||
request_take_focus (MetaWindow *window,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display = window->display;
|
||||
|
||||
meta_topic (META_DEBUG_FOCUS, "WM_TAKE_FOCUS(%s, %u)\n",
|
||||
window->desc, timestamp);
|
||||
|
||||
meta_window_send_icccm_message (window, display->atom_WM_TAKE_FOCUS, timestamp);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_x11_focus (MetaWindow *window,
|
||||
guint32 timestamp)
|
||||
@ -448,9 +460,7 @@ meta_window_x11_focus (MetaWindow *window,
|
||||
timestamp);
|
||||
}
|
||||
|
||||
meta_display_request_take_focus (window->display,
|
||||
window,
|
||||
timestamp);
|
||||
request_take_focus (window, timestamp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user