mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
x11: A few static analysis fixes
This commit is contained in:
parent
1be4684441
commit
e2722f03ac
@ -624,10 +624,12 @@ maybe_sync_counter_for_end_frame (GdkSurface *surface)
|
|||||||
{
|
{
|
||||||
GdkX11Surface *impl = GDK_X11_SURFACE (surface);
|
GdkX11Surface *impl = GDK_X11_SURFACE (surface);
|
||||||
gboolean frame_sync_negotiated = _gdk_x11_surface_syncs_frames (surface);
|
gboolean frame_sync_negotiated = _gdk_x11_surface_syncs_frames (surface);
|
||||||
gboolean frame_done_painting = !impl->toplevel->frame_pending;
|
gboolean frame_done_painting;
|
||||||
|
|
||||||
#ifdef HAVE_XDAMAGE
|
#ifdef HAVE_XDAMAGE
|
||||||
frame_done_painting = !impl->toplevel->frame_still_painting && frame_sync_negotiated;
|
frame_done_painting = !impl->toplevel->frame_still_painting && frame_sync_negotiated;
|
||||||
|
#else
|
||||||
|
frame_done_painting = !impl->toplevel->frame_pending;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!impl->toplevel->frame_pending)
|
if (!impl->toplevel->frame_pending)
|
||||||
@ -1582,7 +1584,6 @@ gdk_x11_surface_show (GdkSurface *surface, gboolean already_mapped)
|
|||||||
GdkToplevelX11 *toplevel;
|
GdkToplevelX11 *toplevel;
|
||||||
Display *xdisplay = GDK_SURFACE_XDISPLAY (surface);
|
Display *xdisplay = GDK_SURFACE_XDISPLAY (surface);
|
||||||
Window xwindow = GDK_SURFACE_XID (surface);
|
Window xwindow = GDK_SURFACE_XID (surface);
|
||||||
GdkX11Surface *impl = GDK_X11_SURFACE (surface);
|
|
||||||
|
|
||||||
if (!already_mapped)
|
if (!already_mapped)
|
||||||
set_initial_hints (surface);
|
set_initial_hints (surface);
|
||||||
@ -1598,6 +1599,7 @@ gdk_x11_surface_show (GdkSurface *surface, gboolean already_mapped)
|
|||||||
|
|
||||||
if (GDK_PROFILER_IS_RUNNING)
|
if (GDK_PROFILER_IS_RUNNING)
|
||||||
{
|
{
|
||||||
|
GdkX11Surface *impl = GDK_X11_SURFACE (surface);
|
||||||
if (impl->map_time == 0)
|
if (impl->map_time == 0)
|
||||||
impl->map_time = g_get_monotonic_time ();
|
impl->map_time = g_get_monotonic_time ();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user