summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author张雯 <[email protected]>2017-11-23 15:55:30 +0800
committerraveit65 <[email protected]>2017-11-25 09:54:29 +0100
commit6ad87a9ae2a7310e8941941bd849c2fb88132d9c (patch)
treefb263ec7402b84ec49d75b14bdff7616aab8b39c
parent8adc487f8cd67d4f2d968ff91a340ffd1856529a (diff)
downloadmate-panel-6ad87a9ae2a7310e8941941bd849c2fb88132d9c.tar.bz2
mate-panel-6ad87a9ae2a7310e8941941bd849c2fb88132d9c.tar.xz
Keep the right icons on bottom still displaying right when the resolution change larger
-rw-r--r--mate-panel/panel-toplevel.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c
index badc595d..326e6c5c 100644
--- a/mate-panel/panel-toplevel.c
+++ b/mate-panel/panel-toplevel.c
@@ -2911,6 +2911,11 @@ panel_toplevel_move_resize_window (PanelToplevel *toplevel,
{
GtkWidget *widget;
+ GList *list;
+ const char *id;
+ int position;
+ gboolean stick;
+
widget = GTK_WIDGET (toplevel);
g_assert (gtk_widget_get_realized (widget));
@@ -2929,6 +2934,29 @@ panel_toplevel_move_resize_window (PanelToplevel *toplevel,
gdk_window_resize (gtk_widget_get_window (widget),
toplevel->priv->geometry.width,
toplevel->priv->geometry.height);
+
+ if(resize || move)
+ {
+ for(list = toplevel->priv->panel_widget->applet_list;list!=NULL;list = g_list_next(list))
+ {
+ AppletData *ad = list->data;
+ id = mate_panel_applet_get_id_by_widget (ad->applet);
+
+ if (!id)
+ return;
+
+ AppletInfo *info;
+ info = mate_panel_applet_get_by_id (id);
+
+ stick = g_settings_get_boolean (info->settings, PANEL_OBJECT_PANEL_RIGHT_STICK_KEY);
+
+ if(stick)
+ {
+ position = g_settings_get_int (info->settings, PANEL_OBJECT_POSITION_KEY);
+ ad->pos = toplevel->priv->geometry.width - position;
+ }
+ }
+ }
}
static void