gpicview: fix segfault under wayland

This commit is contained in:
Daniel Kolesa 2020-08-09 22:50:05 +02:00 committed by q66
parent fc320553f7
commit 676035b45c
2 changed files with 28 additions and 1 deletions

View file

@ -0,0 +1,27 @@
From 513e2b4f5ce50ca306f9b3f52387cb955d844ef2 Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Sun, 9 Aug 2020 22:46:57 +0200
Subject: [PATCH] fix segfault when using under wayland
---
src/working-area.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/working-area.c b/src/working-area.c
index 86a1fa5..36c5e48 100644
--- a/src/working-area.c
+++ b/src/working-area.c
@@ -42,6 +42,10 @@ static gboolean gf_display_get_workarea(GdkScreen* g_screen, GdkRectangle *rect)
GdkDisplay *g_display;
Screen *x_screen;
+ /* avoid touching X stuff when using wayland */
+ if (g_getenv("WAYLAND_DISPLAY"))
+ return FALSE;
+
/* get the gdk display */
g_display = gdk_display_get_default();
if(!g_display)
--
2.28.0

View file

@ -1,7 +1,7 @@
# Template file for 'gpicview'
pkgname=gpicview
version=0.2.5
revision=2
revision=3
build_style=gnu-configure
configure_args="--enable-gtk3"
hostmakedepends="pkg-config intltool"