MetaWindow: Clear fullscreen monitors when monitors change
The fullscreen monitors state is set given a set of xinerama monitor identification numbers. When the monitor configuration changes (e.g. by a hotplug event) these are no longer valid, and may point to uninitialized or unallocated data. Avoid accessing uninitialized/unallocated memory by clearing the fullscreen monitor state when the monitor configuration changes. https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
parent
36f2d5b0f1
commit
103df63023
@ -3540,6 +3540,9 @@ meta_window_update_for_monitors_changed (MetaWindow *window)
|
||||
{
|
||||
const MetaLogicalMonitor *old, *new;
|
||||
|
||||
if (window->fullscreen_monitors[0] != -1)
|
||||
window->fullscreen_monitors[0] = -1;
|
||||
|
||||
if (window->override_redirect || window->type == META_WINDOW_DESKTOP)
|
||||
{
|
||||
meta_window_update_monitor (window, FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user