]> git.alsa-project.org Git - alsa-tools.git/commitdiff
hdajackretask: limit the help window size to something safe (1600x1000) for the help...
authorJaroslav Kysela <perex@perex.cz>
Thu, 25 Jan 2024 12:27:03 +0000 (13:27 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 25 Jan 2024 12:29:03 +0000 (13:29 +0100)
If more monitors are present in the system, the window is too big and information
cannot be visible correctly.

Fixes: https://github.com/alsa-project/alsa-tools/issues/20
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
hdajackretask/main-gtk.c

index f5ff6e4de694568d989eb446be67c590e1295fdd..c561f57eae65eeeb2cc2776560e573d472d019af 100644 (file)
@@ -519,7 +519,7 @@ static void documentation_clicked(GtkWidget* sender, ui_data_t* ui)
         int neww = screen ? (gdk_screen_get_width(screen)*3)/4 : 800;
         int newh = screen ? (gdk_screen_get_height(screen)*3)/4 : 600;
         
-        gtk_window_set_default_size(GTK_WINDOW(dlg), neww, newh);
+        gtk_window_set_default_size(GTK_WINDOW(dlg), MIN(1600, neww), MIN(1000, newh));
     }
 
     gtk_dialog_run(dlg);