[Xfce4-commits] <xfce4-wmdock-plugin:0.6.x> Replace dockapps if the resolution is changed.

Andre Ellguth noreply at xfce.org
Thu Oct 10 22:00:01 CEST 2013


Updating branch refs/heads/0.6.x
         to 7ee37205b7cc23156e9d02b1622adaa193a96b2b (commit)
       from 609eb8096e79a5d8c13b2377585a5a77d852c058 (commit)

commit 7ee37205b7cc23156e9d02b1622adaa193a96b2b
Author: Andre Ellguth <andre at ellguth.com>
Date:   Thu Oct 10 21:58:10 2013 +0200

    Replace dockapps if the resolution is changed.

 panel-plugin/wmdock.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/panel-plugin/wmdock.c b/panel-plugin/wmdock.c
index 50420f9..7ef194d 100644
--- a/panel-plugin/wmdock.c
+++ b/panel-plugin/wmdock.c
@@ -69,6 +69,20 @@ static void wmdock_orientation_changed (XfcePanelPlugin *plugin, GtkOrientation
 }
 
 
+static void wmdock_resolution_changed (GdkScreen *screen, gpointer data)
+{
+	if( IS_PANELOFF(wmdock) )
+		wmdock_order_dockapps(wmdock_get_primary_anchor_dockapp());
+}
+
+
+static void wmdock_monitors_changed (GdkScreen *screen, gpointer data)
+{
+	if( IS_PANELOFF(wmdock) )
+		wmdock_order_dockapps(wmdock_get_primary_anchor_dockapp());
+}
+
+
 static gboolean wmdock_size_changed (XfcePanelPlugin *plugin, int size)
 {
 	if (xfce_panel_plugin_get_orientation (plugin) ==
@@ -185,6 +199,8 @@ static void wmdock_construct (XfcePanelPlugin *plugin)
 	g_signal_connect (plugin, "size-changed", G_CALLBACK (wmdock_size_changed), NULL);
 	g_signal_connect (plugin, "orientation-changed", G_CALLBACK (wmdock_orientation_changed), NULL);
 	g_signal_connect (plugin, "free-data", G_CALLBACK (wmdock_free_data), NULL);
+	g_signal_connect(get_current_gdkscreen(), "size-changed", G_CALLBACK(wmdock_resolution_changed), NULL);
+	g_signal_connect(get_current_gdkscreen(), "monitors-changed", G_CALLBACK(wmdock_monitors_changed), NULL);
 
 	gtk_container_add (GTK_CONTAINER (plugin), wmdock->eventBox);
 


More information about the Xfce4-commits mailing list