diff options
author | John Stebbins <[email protected]> | 2017-12-23 11:39:31 -0800 |
---|---|---|
committer | John Stebbins <[email protected]> | 2017-12-23 11:39:31 -0800 |
commit | cfde9ff37be22b0dd15a98cf3046d54edeb47ed5 (patch) | |
tree | eeaa343d055ba5d0d1b9873decd21b8801b25af7 | |
parent | 6da8c1002167916be99164f01b93be44d0339aeb (diff) |
LinGui: fix window size queries on wayland
-rw-r--r-- | gtk/src/callbacks.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 8bd7443de..9c5a2e893 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -5814,14 +5814,15 @@ presets_window_configure_cb( { if (gtk_widget_get_visible(widget)) { - gint w, h; + gint w, h, ww, wh; w = ghb_dict_get_int(ud->prefs, "presets_window_width"); h = ghb_dict_get_int(ud->prefs, "presets_window_height"); - if ( w != event->width || h != event->height ) + gtk_window_get_size(GTK_WINDOW(widget), &ww, &wh); + if ( w != ww || h != wh ) { - ghb_dict_set_int(ud->prefs, "presets_window_width", event->width); - ghb_dict_set_int(ud->prefs, "presets_window_height", event->height); + ghb_dict_set_int(ud->prefs, "presets_window_width", ww); + ghb_dict_set_int(ud->prefs, "presets_window_height", wh); ghb_pref_set(ud->prefs, "presets_window_width"); ghb_pref_set(ud->prefs, "presets_window_height"); ghb_prefs_store(); @@ -5838,14 +5839,15 @@ window_configure_cb( { if (gtk_widget_get_visible(widget)) { - gint w, h; + gint w, h, ww, wh; w = ghb_dict_get_int(ud->prefs, "window_width"); h = ghb_dict_get_int(ud->prefs, "window_height"); - if ( w != event->width || h != event->height ) + gtk_window_get_size(GTK_WINDOW(widget), &ww, &wh); + if ( w != ww || h != wh ) { - ghb_dict_set_int(ud->prefs, "window_width", event->width); - ghb_dict_set_int(ud->prefs, "window_height", event->height); + ghb_dict_set_int(ud->prefs, "window_width", ww); + ghb_dict_set_int(ud->prefs, "window_height", wh); ghb_pref_set(ud->prefs, "window_width"); ghb_pref_set(ud->prefs, "window_height"); ghb_prefs_store(); |