diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-06-07 15:26:03 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-06-08 03:41:32 +0000 |
commit | 502335612c4c35a4bf7f19ffa7500ea1aac7d43f (patch) | |
tree | 8979d9cea502a7d18c4caccaf5d690e275522918 /ui/gtk/main.c | |
parent | 73286c417eebe975edb24a024eb0230bbca29acc (diff) |
Use separate main geometry settings for Qt and GTK+.
Qt and GTK+ can have wildly different notions about the top-left
position of the main window, particularly in multiple-screen
configurations. For example, on OS X with the following monitor
arrangment:
g .---------.
| |
| |
q--------.| |
| |`---------'
| |
`--------'
GTK+ positions windows relative to 'g' and Qt positions windows relative
to 'q'. As a result it's easy for one UI to clobber the settings of the
other.
Split the geometry_main_x and geometry_main_y recent settings into Qt
and GTK+ versions.
In the Qt UI, try moving the main window onscreen before falling back to
the default geometry. This keeps us from losing our size settings.
Add a link to a Qt geometry bug.
Change-Id: If7ae0dcc1719e646299ee3bbf1c88743f655c9a0
Ping-Bug: 12389
Reviewed-on: https://code.wireshark.org/review/15775
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/gtk/main.c')
-rw-r--r-- | ui/gtk/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/gtk/main.c b/ui/gtk/main.c index 863d16f372..378d4ab37a 100644 --- a/ui/gtk/main.c +++ b/ui/gtk/main.c @@ -1088,8 +1088,8 @@ main_load_window_geometry(GtkWidget *widget) window_geometry_t geom; geom.set_pos = prefs.gui_geometry_save_position; - geom.x = recent.gui_geometry_main_x; - geom.y = recent.gui_geometry_main_y; + geom.x = recent.gui_gtk_geometry_main_x; + geom.y = recent.gui_gtk_geometry_main_y; geom.set_size = prefs.gui_geometry_save_size; if (recent.gui_geometry_main_width > 0 && recent.gui_geometry_main_height > 0) { @@ -1121,8 +1121,8 @@ main_save_window_geometry(GtkWidget *widget) window_get_geometry(widget, &geom); if (prefs.gui_geometry_save_position) { - recent.gui_geometry_main_x = geom.x; - recent.gui_geometry_main_y = geom.y; + recent.gui_gtk_geometry_main_x = geom.x; + recent.gui_gtk_geometry_main_y = geom.y; } if (prefs.gui_geometry_save_size) { |