[gtk/inspector-display: 1/14] Make a test with a custom display
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/inspector-display: 1/14] Make a test with a custom display
- Date: Sat, 7 Dec 2019 17:44:29 +0000 (UTC)
commit 3ee9b0cf4b3439c8a766ad6c35269e4d946dac62
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Dec 7 09:49:10 2019 -0500
Make a test with a custom display
This completely breaks the inspector.
tests/simple.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/tests/simple.c b/tests/simple.c
index 63ae18f2f6..3369eebcf8 100644
--- a/tests/simple.c
+++ b/tests/simple.c
@@ -33,6 +33,13 @@ main (int argc, char *argv[])
gtk_init ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ if (g_getenv ("CUSTOM_DISPLAY"))
+ {
+ GdkDisplay *display = gdk_display_open (NULL);
+ gtk_window_set_display (GTK_WINDOW (window), display);
+ }
+
gtk_window_set_title (GTK_WINDOW (window), "hello world");
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]