mirror of
https://github.com/brl/mutter.git
synced 2025-07-15 22:57:19 +00:00
Add meta_window_is_remote
It's useful for plugins to be able to easily detect whether or not a window is from a remote host. Also, make use of this in the window delete codepath, instead of looking up the hostname each time. https://bugzilla.gnome.org/show_bug.cgi?id=620585
This commit is contained in:
@ -429,6 +429,7 @@ meta_display_open (void)
|
||||
GSList *tmp;
|
||||
int i;
|
||||
guint32 timestamp;
|
||||
char buf[257];
|
||||
|
||||
/* A list of all atom names, so that we can intern them in one go. */
|
||||
char *atom_names[] = {
|
||||
@ -463,6 +464,11 @@ meta_display_open (void)
|
||||
*/
|
||||
the_display->name = g_strdup (XDisplayName (NULL));
|
||||
the_display->xdisplay = xdisplay;
|
||||
if (gethostname (buf, sizeof(buf)-1) == 0)
|
||||
{
|
||||
buf[sizeof(buf)-1] = '\0';
|
||||
the_display->hostname = g_strdup (buf);
|
||||
}
|
||||
the_display->error_trap_synced_at_last_pop = TRUE;
|
||||
the_display->error_traps = 0;
|
||||
the_display->error_trap_handler = NULL;
|
||||
|
Reference in New Issue
Block a user