[gtk/static-analysis-fixes: 2/13] x11: A few static analysis fixes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/static-analysis-fixes: 2/13] x11: A few static analysis fixes
- Date: Mon, 3 May 2021 11:45:01 +0000 (UTC)
commit e2722f03acff4955d6d073ce51424c7401059111
Author: Matthias Clasen <mclasen redhat com>
Date: Mon May 3 07:32:57 2021 -0400
x11: A few static analysis fixes
gdk/x11/gdksurface-x11.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index f8a69b858e..fd5dabeaa1 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -624,10 +624,12 @@ maybe_sync_counter_for_end_frame (GdkSurface *surface)
{
GdkX11Surface *impl = GDK_X11_SURFACE (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
frame_done_painting = !impl->toplevel->frame_still_painting && frame_sync_negotiated;
+#else
+ frame_done_painting = !impl->toplevel->frame_pending;
#endif
if (!impl->toplevel->frame_pending)
@@ -1582,7 +1584,6 @@ gdk_x11_surface_show (GdkSurface *surface, gboolean already_mapped)
GdkToplevelX11 *toplevel;
Display *xdisplay = GDK_SURFACE_XDISPLAY (surface);
Window xwindow = GDK_SURFACE_XID (surface);
- GdkX11Surface *impl = GDK_X11_SURFACE (surface);
if (!already_mapped)
set_initial_hints (surface);
@@ -1598,6 +1599,7 @@ gdk_x11_surface_show (GdkSurface *surface, gboolean already_mapped)
if (GDK_PROFILER_IS_RUNNING)
{
+ GdkX11Surface *impl = GDK_X11_SURFACE (surface);
if (impl->map_time == 0)
impl->map_time = g_get_monotonic_time ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]