GNOME Bugzilla – Bug 620585
Add meta_window_is_remote
Last modified: 2010-06-07 13:51:06 UTC
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.
Created attachment 162765 [details] [review] Add meta_window_is_remote
Comment on attachment 162765 [details] [review] Add meta_window_is_remote +gboolean +meta_window_is_remote (MetaWindow *window) +{ + g_return_val_if_fail (META_IS_WINDOW (window), FALSE); + + return strcmp (window->wm_client_machine, window->display->hostname) != 0; The strcmp needs a NULL check on both parameters, maybe use g_strcmp0 instead ? Otherwise looks fine.
Attachment 162765 [details] pushed as 3a73f6b - Add meta_window_is_remote