aboutsummaryrefslogtreecommitdiffstats
path: root/src/camorama-window.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-30 13:56:01 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-30 16:55:33 +0200
commit994bee69b165bcd2dff13f646548ae43f2a3c704 (patch)
treed821e14e9f61614727c6e465746e860244f364c0 /src/camorama-window.c
parent1a76000d06c955471e8c3022d471adcee71cd6ac (diff)
Allow expanding the window with Gtk3
It is nice to be able to expand the window in real time. Add support for it with Gtk3. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'src/camorama-window.c')
-rw-r--r--src/camorama-window.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/camorama-window.c b/src/camorama-window.c
index 21fefc7..337032f 100644
--- a/src/camorama-window.c
+++ b/src/camorama-window.c
@@ -360,7 +360,6 @@ void load_interface(cam_t *cam)
// Ensure that windows will be resized due to the controls
gtk_window_resize(GTK_WINDOW(window), 320, 240);
-
/* buttons */
g_signal_connect(gtk_builder_get_object(cam->xml, "quit"), "activate",
G_CALLBACK(on_quit_activate), cam);
@@ -511,4 +510,10 @@ void load_interface(cam_t *cam)
set_sensitive(cam);
gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(cam->xml, "string_entry")),
cam->usestring);
+
+ // Detect window resize calls
+#if GTK_MAJOR_VERSION >= 3
+ g_signal_connect(window,
+ "configure-event", G_CALLBACK(on_configure_event), cam);
+#endif
}

Privacy Policy