Skip to content
  • Ray Strode's avatar
    window: fix meta_window_is_remote across hostname changes · 2cafb8be
    Ray Strode authored
    meta_window_is_remote compares a cached copy of the system hostname
    with the hostname of the client window
    (as presented by the WM_CLIENT_MACHINE property).
    
    Of course, the system hostname can change at any time, so caching
    it is wrong. Also, the WM_CLIENT_MACHINE property won't necessarily
    change when the system hostname changes, so comparing it with the
    new system hostname is wrong, too.
    
    This commit makes the code call gethostname() at the time
    WM_CLIENT_MACHINE is set, check whether it's remote then, and cache
    that value, rather than comparing potentially out of sync hostnames
    later.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688716
    2cafb8be