app: make things behave more reasonable with multiple monitors
There is now a preference option that determines whether windows should be opened on the same monitor as before. It should be disabled when the machine gets monitors plugged/unplugged dynamically ("laptop") and enabled when there is a static multi-monitor setup ("wokstation"). This is merely the current simplistic policy on top of the newly added underlying infrastructure: - pass integer monitor numbers around in all places where we already pass around a GdkScreen. Pass the "current" monitor to these changed APIs, where "current" is either the monitor where the action-triggering widget is, or if that is unavailable the monitor where the mouse is. - add gimp_widget_get_monitor() in order to easily get to the monitor, just like gtk_widget_get_screen(). - add screen and monitor parameters in some places that were missed before. - in sessionrc, save all window positions relative to the window's monitor, and save the monitor separately, if it's not the screen's primary monitor. - when restoring window positions, use the stored monitor when the new prefs options says so (use the screen's primary monitor if there is no stored monitor), otherwise use current monitor that is now passed around.
This commit is contained in:
@ -54,6 +54,8 @@ GType gimp_tool_gui_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GimpToolGui * gimp_tool_gui_new (GimpToolInfo *tool_info,
|
||||
const gchar *description,
|
||||
GdkScreen *screen,
|
||||
gint monitor,
|
||||
gboolean overlay,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
|
||||
@ -72,6 +74,8 @@ void gimp_tool_gui_show (GimpToolGui *gui);
|
||||
void gimp_tool_gui_hide (GimpToolGui *gui);
|
||||
|
||||
void gimp_tool_gui_set_overlay (GimpToolGui *gui,
|
||||
GdkScreen *screen,
|
||||
gint monitor,
|
||||
gboolean overlay);
|
||||
gboolean gimp_tool_gui_get_overlay (GimpToolGui *gui);
|
||||
|
||||
|
Reference in New Issue
Block a user