[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [PATCH 1/2] Don't freeze property notifications when adding new displays



Freezing property notifications prevents VirtViewerDisplaySpice from
synchronizing its fullscreen/auto-resize state with the base class until after
the notifications are thawed.  During the time that notifications were frozen,
an allocation happens. The action we take on an allocation event depends on the
current state of the auto_resize variable, so this can result in an unwanted
resize.
---
 src/virt-viewer-session-spice.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index d9b4f88..b42d48e 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -629,7 +629,6 @@ virt_viewer_session_spice_display_monitors(SpiceChannel *channel,
             g_ptr_array_index(displays, i) = g_object_ref(display);
         }
 
-        g_object_freeze_notify(G_OBJECT(display));
         virt_viewer_session_add_display(VIRT_VIEWER_SESSION(self),
                                         VIRT_VIEWER_DISPLAY(display));
     }
@@ -647,9 +646,6 @@ virt_viewer_session_spice_display_monitors(SpiceChannel *channel,
                                              monitor->width, monitor->height);
     }
 
-    for (i = 0; i < monitors_max; i++)
-        g_object_thaw_notify(g_ptr_array_index(displays, i));
-
     g_clear_pointer(&monitors, g_array_unref);
 
 }
-- 
1.8.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]