Skip to content

Commit

Permalink
set dialog windows position to location near mouse
Browse files Browse the repository at this point in the history
  • Loading branch information
johnny-bit committed May 18, 2020
1 parent 563b286 commit 010242c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/gtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2606,6 +2606,8 @@ gboolean dt_gui_show_standalone_yes_no_dialog(const char *title, const char *mar
gtk_window_set_title(GTK_WINDOW(window), title);
g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);

gtk_window_set_position (GTK_WINDOW(window), GTK_WIN_POS_MOUSE);

GtkWidget *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add(GTK_CONTAINER(window), vbox);

Expand Down Expand Up @@ -2654,6 +2656,8 @@ char *dt_gui_show_standalone_string_dialog(const char *title, const char *markup
gtk_window_set_title(GTK_WINDOW(window), title);
g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);

gtk_window_set_position (GTK_WINDOW(window), GTK_WIN_POS_MOUSE);

GtkWidget *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
gtk_widget_set_margin_start(vbox, 10);
gtk_widget_set_margin_end(vbox, 10);
Expand Down

0 comments on commit 010242c

Please sign in to comment.