1
0
Fork 0

If activation requests are too old, set the demands_attention hint instead

2005-02-06  Elijah Newren  <newren@gmail.com>

	If activation requests are too old, set the demands_attention hint
	instead of actually activating.  Thanks to Crispin Flowerday for
	the test case and for testing the patch.  Fixes half of #166395.

	* src/window.c: (meta_window_activate): if the request came before
	the last focus time, set the demands attention hint instead
This commit is contained in:
Elijah Newren 2005-02-06 16:52:26 +00:00 committed by Elijah Newren
parent 114c7c0be5
commit d11681e505
2 changed files with 23 additions and 0 deletions

View file

@ -1,3 +1,12 @@
2005-02-06 Elijah Newren <newren@gmail.com>
If activation requests are too old, set the demands_attention hint
instead of actually activating. Thanks to Crispin Flowerday for
the test case and for testing the patch. Fixes half of #166395.
* src/window.c: (meta_window_activate): if the request came before
the last focus time, set the demands attention hint instead
2005-02-04 Dave Ahlswede <mightyquinn@letterboxes.org> 2005-02-04 Dave Ahlswede <mightyquinn@letterboxes.org>
* src/metacity.schemas.in: Add period to the end of * src/metacity.schemas.in: Add period to the end of

View file

@ -2155,6 +2155,20 @@ void
meta_window_activate (MetaWindow *window, meta_window_activate (MetaWindow *window,
guint32 timestamp) guint32 timestamp)
{ {
/* Older EWMH spec didn't specify a timestamp, so it can be 0 and we
* have to treat that as a new request.
*/
if (XSERVER_TIME_IS_BEFORE (timestamp, window->display->last_focus_time) &&
timestamp != 0)
{
meta_topic (META_DEBUG_FOCUS,
"_NET_ACTIVE_WINDOW message sent but with a timestamp that"
"requests the window not be active, so we're ignoring it.\n");
window->wm_state_demands_attention = TRUE;
set_net_wm_state (window);
return;
}
if (timestamp != 0) if (timestamp != 0)
window->net_wm_user_time = timestamp; window->net_wm_user_time = timestamp;