mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
Move alarm and xids management to MetaX11Display
https://bugzilla.gnome.org/show_bug.cgi?id=759538
This commit is contained in:

committed by
Jonas Ådahl

parent
937a9853cd
commit
722c975aca
@ -41,7 +41,7 @@ typedef struct {
|
||||
} TestCase;
|
||||
|
||||
static gboolean
|
||||
test_case_alarm_filter (MetaDisplay *display,
|
||||
test_case_alarm_filter (MetaX11Display *x11_display,
|
||||
XSyncAlarmNotifyEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
@ -49,12 +49,12 @@ test_case_alarm_filter (MetaDisplay *display,
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
|
||||
if (async_waiter_alarm_filter (test->waiter, display, event))
|
||||
if (async_waiter_alarm_filter (test->waiter, x11_display, event))
|
||||
return TRUE;
|
||||
|
||||
g_hash_table_iter_init (&iter, test->clients);
|
||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
||||
if (test_client_alarm_filter (value, display, event))
|
||||
if (test_client_alarm_filter (value, x11_display, event))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
@ -103,8 +103,8 @@ test_case_new (void)
|
||||
test_case_log_func,
|
||||
test);
|
||||
|
||||
meta_display_set_alarm_filter (meta_get_display (),
|
||||
test_case_alarm_filter, test);
|
||||
meta_x11_display_set_alarm_filter (meta_get_display ()->x11_display,
|
||||
test_case_alarm_filter, test);
|
||||
|
||||
test->clients = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
test->waiter = async_waiter_new ();
|
||||
@ -501,7 +501,8 @@ test_case_destroy (TestCase *test,
|
||||
|
||||
async_waiter_destroy (test->waiter);
|
||||
|
||||
meta_display_set_alarm_filter (meta_get_display (), NULL, NULL);
|
||||
meta_x11_display_set_alarm_filter (meta_get_display ()->x11_display,
|
||||
NULL, NULL);
|
||||
|
||||
g_hash_table_destroy (test->clients);
|
||||
g_free (test);
|
||||
|
@ -162,7 +162,7 @@ async_waiter_set_and_wait (AsyncWaiter *waiter)
|
||||
|
||||
gboolean
|
||||
async_waiter_alarm_filter (AsyncWaiter *waiter,
|
||||
MetaDisplay *display,
|
||||
MetaX11Display *x11_display,
|
||||
XSyncAlarmNotifyEvent *event)
|
||||
{
|
||||
if (event->alarm != waiter->alarm)
|
||||
@ -335,11 +335,11 @@ test_client_find_window (TestClient *client,
|
||||
|
||||
gboolean
|
||||
test_client_alarm_filter (TestClient *client,
|
||||
MetaDisplay *display,
|
||||
MetaX11Display *x11_display,
|
||||
XSyncAlarmNotifyEvent *event)
|
||||
{
|
||||
if (client->waiter)
|
||||
return async_waiter_alarm_filter (client->waiter, display, event);
|
||||
return async_waiter_alarm_filter (client->waiter, x11_display, event);
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ void test_init (int argc,
|
||||
char **argv);
|
||||
|
||||
gboolean async_waiter_alarm_filter (AsyncWaiter *waiter,
|
||||
MetaDisplay *display,
|
||||
MetaX11Display *x11_display,
|
||||
XSyncAlarmNotifyEvent *event);
|
||||
|
||||
void async_waiter_set_and_wait (AsyncWaiter *waiter);
|
||||
@ -56,7 +56,7 @@ void async_waiter_destroy (AsyncWaiter *waiter);
|
||||
char * test_client_get_id (TestClient *client);
|
||||
|
||||
gboolean test_client_alarm_filter (TestClient *client,
|
||||
MetaDisplay *display,
|
||||
MetaX11Display *x11_display,
|
||||
XSyncAlarmNotifyEvent *event);
|
||||
|
||||
gboolean test_client_wait (TestClient *client,
|
||||
|
Reference in New Issue
Block a user