forked from AuroraMiddleware/gtk
gdksurface: Make all surfaces listen to the frame clock signals
Instead of the toplevel driving popups, have the popups listen to the frame clock themselves. Otherwise, if the toplevel for some reason isn't drawn by the compositor and stops drawing new frames, popups wouldn't get painted either.
This commit is contained in:
parent
5db079b052
commit
a7ee1b4e85
@ -1404,7 +1404,6 @@ gdk_surface_paint_on_clock (GdkFrameClock *clock,
|
||||
void *data)
|
||||
{
|
||||
GdkSurface *surface = GDK_SURFACE (data);
|
||||
GList *l;
|
||||
|
||||
g_return_if_fail (GDK_IS_SURFACE (surface));
|
||||
|
||||
@ -1425,9 +1424,6 @@ gdk_surface_paint_on_clock (GdkFrameClock *clock,
|
||||
gdk_surface_remove_update_surface (surface);
|
||||
}
|
||||
|
||||
for (l = surface->children; l; l = l->next)
|
||||
gdk_surface_paint_on_clock (clock, l->data);
|
||||
|
||||
g_object_unref (surface);
|
||||
}
|
||||
|
||||
@ -3719,21 +3715,19 @@ gdk_surface_set_frame_clock (GdkSurface *surface,
|
||||
if (clock)
|
||||
{
|
||||
g_object_ref (clock);
|
||||
if (surface->parent == NULL)
|
||||
{
|
||||
g_signal_connect (G_OBJECT (clock),
|
||||
"flush-events",
|
||||
G_CALLBACK (gdk_surface_flush_events),
|
||||
surface);
|
||||
g_signal_connect (G_OBJECT (clock),
|
||||
"resume-events",
|
||||
G_CALLBACK (gdk_surface_resume_events),
|
||||
surface);
|
||||
g_signal_connect (G_OBJECT (clock),
|
||||
"paint",
|
||||
G_CALLBACK (gdk_surface_paint_on_clock),
|
||||
surface);
|
||||
}
|
||||
|
||||
g_signal_connect (G_OBJECT (clock),
|
||||
"flush-events",
|
||||
G_CALLBACK (gdk_surface_flush_events),
|
||||
surface);
|
||||
g_signal_connect (G_OBJECT (clock),
|
||||
"resume-events",
|
||||
G_CALLBACK (gdk_surface_resume_events),
|
||||
surface);
|
||||
g_signal_connect (G_OBJECT (clock),
|
||||
"paint",
|
||||
G_CALLBACK (gdk_surface_paint_on_clock),
|
||||
surface);
|
||||
|
||||
if (surface->update_freeze_count == 0)
|
||||
_gdk_frame_clock_inhibit_freeze (clock);
|
||||
@ -3741,21 +3735,18 @@ gdk_surface_set_frame_clock (GdkSurface *surface,
|
||||
|
||||
if (surface->frame_clock)
|
||||
{
|
||||
if (surface->parent == NULL)
|
||||
{
|
||||
if (surface->frame_clock_events_paused)
|
||||
gdk_surface_resume_events (surface->frame_clock, G_OBJECT (surface));
|
||||
if (surface->frame_clock_events_paused)
|
||||
gdk_surface_resume_events (surface->frame_clock, G_OBJECT (surface));
|
||||
|
||||
g_signal_handlers_disconnect_by_func (G_OBJECT (surface->frame_clock),
|
||||
G_CALLBACK (gdk_surface_flush_events),
|
||||
surface);
|
||||
g_signal_handlers_disconnect_by_func (G_OBJECT (surface->frame_clock),
|
||||
G_CALLBACK (gdk_surface_resume_events),
|
||||
surface);
|
||||
g_signal_handlers_disconnect_by_func (G_OBJECT (surface->frame_clock),
|
||||
G_CALLBACK (gdk_surface_paint_on_clock),
|
||||
surface);
|
||||
}
|
||||
g_signal_handlers_disconnect_by_func (G_OBJECT (surface->frame_clock),
|
||||
G_CALLBACK (gdk_surface_flush_events),
|
||||
surface);
|
||||
g_signal_handlers_disconnect_by_func (G_OBJECT (surface->frame_clock),
|
||||
G_CALLBACK (gdk_surface_resume_events),
|
||||
surface);
|
||||
g_signal_handlers_disconnect_by_func (G_OBJECT (surface->frame_clock),
|
||||
G_CALLBACK (gdk_surface_paint_on_clock),
|
||||
surface);
|
||||
|
||||
if (surface->update_freeze_count == 0)
|
||||
_gdk_frame_clock_uninhibit_freeze (surface->frame_clock);
|
||||
|
Loading…
Reference in New Issue
Block a user