[gnome-panel] [panel] Do not save monitor changes that are caused by constraints
- From: Vincent Untz <vuntz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-panel] [panel] Do not save monitor changes that are caused by constraints
- Date: Thu, 20 Aug 2009 12:49:04 +0000 (UTC)
commit e958123e05fe51e9627c3a5fc74d8013de6ed863
Author: Vincent Untz <vuntz gnome org>
Date: Wed Aug 12 13:13:20 2009 +0200
[panel] Do not save monitor changes that are caused by constraints
We only want to save changes that are made by the user.
gnome-panel/panel-toplevel.c | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/gnome-panel/panel-toplevel.c b/gnome-panel/panel-toplevel.c
index ca1a2e5..c23a0c0 100644
--- a/gnome-panel/panel-toplevel.c
+++ b/gnome-panel/panel-toplevel.c
@@ -232,6 +232,9 @@ static guint toplevel_signals [LAST_SIGNAL] = { 0 };
static GSList *toplevel_list = NULL;
static void panel_toplevel_calculate_animation_end_geometry (PanelToplevel *toplevel);
+static void panel_toplevel_set_monitor_internal (PanelToplevel *toplevel,
+ int monitor);
+
GSList *
panel_toplevel_list_toplevels (void)
@@ -2115,7 +2118,7 @@ panel_toplevel_update_expanded_position (PanelToplevel *toplevel)
monitor = panel_multiscreen_get_monitor_at_point (screen, x, y);
- panel_toplevel_set_monitor (toplevel, monitor);
+ panel_toplevel_set_monitor_internal (toplevel, monitor);
x -= panel_multiscreen_x (screen, monitor);
y -= panel_multiscreen_y (screen, monitor);
@@ -4983,6 +4986,17 @@ panel_toplevel_get_y_centered (PanelToplevel *toplevel)
return toplevel->priv->y_centered;
}
+/* This is used when we need to change the monitor because of constraints, but
+ * not because of the configuration. */
+static void
+panel_toplevel_set_monitor_internal (PanelToplevel *toplevel,
+ int monitor)
+{
+ toplevel->priv->monitor = monitor;
+
+ gtk_widget_queue_resize (GTK_WIDGET (toplevel));
+}
+
void
panel_toplevel_set_monitor (PanelToplevel *toplevel,
int monitor)
@@ -5002,9 +5016,7 @@ panel_toplevel_set_monitor (PanelToplevel *toplevel,
if (monitor >= panel_multiscreen_monitors (screen))
return;
- toplevel->priv->monitor = monitor;
-
- gtk_widget_queue_resize (GTK_WIDGET (toplevel));
+ panel_toplevel_set_monitor_internal (toplevel, monitor);
g_object_notify (G_OBJECT (toplevel), "monitor");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]