diff options
author | 张雯 <[email protected]> | 2017-11-23 15:55:30 +0800 |
---|---|---|
committer | 张雯 <[email protected]> | 2017-11-23 15:55:30 +0800 |
commit | f95539a051b7a83d5812563d17e50313c7f1f3d2 (patch) | |
tree | 930b92e278096f5ce8fbfe49da60c05f5d1da7e5 | |
parent | 2b17f4f461cff056ab0f4687a9ac673a16933f7c (diff) | |
download | mate-panel-f95539a051b7a83d5812563d17e50313c7f1f3d2.tar.bz2 mate-panel-f95539a051b7a83d5812563d17e50313c7f1f3d2.tar.xz |
Keep the right icons on bottom still displaying right when the resolution change larger
-rw-r--r-- | mate-panel/panel-toplevel.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c index 96084f43..79c5e3a5 100644 --- a/mate-panel/panel-toplevel.c +++ b/mate-panel/panel-toplevel.c @@ -2915,6 +2915,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)); @@ -2933,6 +2938,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 |