diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-04-08 16:39:24 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-04-08 18:15:44 +0200 |
commit | 8a5beb2c580e852a567aa57046ce259924cb0ea9 (patch) | |
tree | 1c577d6ff4df50e05f77c749ad281d337bac84a8 /src/camorama-window.c | |
parent | 99a2e0087f25a6f865d11bfab39d358bde13d71e (diff) |
add support for full screen mode
Nowadays, there are several UVC devices that can be used to
capture HDMI images. Those could be used, for instance, to
display a console from another machine. On such case, it can
be interesting to use as little as possible of the screen,
in order to maximize the screen.
Let's implement a full screen mode that will disable everything
but the top menu, and place the application in full screen
mode.
As this depends on a proper scaling support, only enable 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.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/camorama-window.c b/src/camorama-window.c index 8f05d78..7e69e36 100644 --- a/src/camorama-window.c +++ b/src/camorama-window.c @@ -516,5 +516,12 @@ void load_interface(cam_t *cam) // Detect window resize calls g_signal_connect(GTK_WIDGET(gtk_builder_get_object(cam->xml, "da")), "configure-event", G_CALLBACK(on_configure_event), cam); + g_signal_connect(window, "window-state-event", + G_CALLBACK(on_window_state_event), cam); + + g_signal_connect(gtk_builder_get_object(cam->xml, "button3"), + "clicked", G_CALLBACK(toggle_fullscreen), cam); + g_signal_connect(gtk_builder_get_object(cam->xml, "imagemenuitem2"), + "activate", G_CALLBACK(toggle_fullscreen), cam); #endif } |