[gtk+] testgtk: Fix enabling of the cursor demo
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] testgtk: Fix enabling of the cursor demo
- Date: Tue, 2 Sep 2014 18:28:39 +0000 (UTC)
commit 1073ae57ce18e80b1e3f4c3e33dfd487ef369836
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Sep 2 11:24:34 2014 -0700
testgtk: Fix enabling of the cursor demo
Make this a lot less hacky.
tests/testgtk.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/tests/testgtk.c b/tests/testgtk.c
index acc3ced..ee20acc 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -4936,10 +4936,9 @@ create_cursors (GtkWidget *widget)
GtkWidget *label;
GtkWidget *any;
GtkAdjustment *adjustment;
-#ifdef GDK_WINDOWING_X11
GtkWidget *entry;
GtkWidget *size;
-#endif
+ gboolean cursor_demo = FALSE;
if (!window)
{
@@ -4967,7 +4966,16 @@ create_cursors (GtkWidget *widget)
"GtkWidget::visible", TRUE,
NULL);
- if (1 || GDK_IS_X11_DISPLAY (gtk_widget_get_display (vbox)))
+#ifdef GDK_WINDOWING_WAYLAND
+ if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (vbox)))
+ cursor_demo = TRUE;
+#endif
+#ifdef GDK_WINDOWING_WAYLAND
+ if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (vbox)))
+ cursor_demo = TRUE;
+#endif
+
+ if (cursor_demo)
{
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]