Bug#871523: xfce4-panel: Multiple monitors: panel ignores the "main monitor"

2017-10-27 Thread Robert Pintarelli
Package: xfce4-panel
Version: 4.12.1-2
Followup-For: Bug #871523

Dear Maintainer,

this bug was fixed by upstream for the 4.12 release of xfce. I extracted the 
patch from
here https://git.xfce.org/users/ochosi/xfce4-panel/log/?h=primary_for_4_12 

It would be great if this patch was applied since it really seems that this 
issue bothers 
lots of people.

Note: In order to get it working I had to reconfigure/reset to configuration 
for each panel. 
  Although the preferences dialog displayed "Primary" as Output, it 
actually still used 
  "Automatic".
  To fix this just manually select "Automatic" in the drop box and the 
select "Primary"
  again. 

Best regards,

   Robert

-- System Information:
Debian Release: 9.1
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'unstable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US:en 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages xfce4-panel depends on:
ii  exo-utils0.10.7-1
ii  libatk1.0-0  2.22.0-1
ii  libc62.24-11+deb9u1
ii  libcairo21.14.8-1
ii  libdbus-1-3  1.10.18-1
ii  libdbus-glib-1-2 0.108-2
ii  libexo-1-0   0.10.7-1
ii  libfontconfig1   2.11.0-6.7+b1
ii  libfreetype6 2.6.3-3.2
ii  libgarcon-1-00.4.0-2
ii  libgdk-pixbuf2.0-0   2.36.5-2
ii  libglib2.0-0 2.50.3-2
ii  libgtk2.0-0  2.24.31-2
ii  libice6  2:1.0.9-2
ii  libpango-1.0-0   1.40.5-1
ii  libpangocairo-1.0-0  1.40.5-1
ii  libpangoft2-1.0-01.40.5-1
ii  libsm6   2:1.2.2-1+b3
ii  libwnck222.30.7-5.1
ii  libx11-6 2:1.6.4-3
ii  libxext6 2:1.3.3-1+b2
ii  libxfce4ui-1-0   4.12.1-2
ii  libxfce4util74.12.1-3
ii  libxfconf-0-24.12.1-1

xfce4-panel recommends no packages.

xfce4-panel suggests no packages.

-- no debconf information
--- xfce4-panel-4.12.1/panel/panel-preferences-dialog.c 2016-08-11 
23:54:27.0 +0200
+++ xfce4-panel-primary_for_4_12/panel/panel-preferences-dialog.c   
2017-04-12 18:33:27.0 +0200
@@ -488,9 +488,18 @@
   || !exo_str_is_empty (output_name))
 {
   gtk_list_store_insert_with_values (GTK_LIST_STORE (store), , n++,
- OUTPUT_NAME, NULL,
+ OUTPUT_NAME, "Automatic",
  OUTPUT_TITLE, _("Automatic"), -1);
-  if (exo_str_is_empty (output_name))
+  if (g_strcmp0 (output_name, "Automatic") == 0) {
+gtk_combo_box_set_active_iter (GTK_COMBO_BOX (object), );
+output_selected = TRUE;
+span_monitors_sensitive = TRUE;
+  }
+  gtk_list_store_insert_with_values (GTK_LIST_STORE (store), , n++,
+ OUTPUT_NAME, "Primary",
+ OUTPUT_TITLE, _("Primary"), -1);
+  if (exo_str_is_empty (output_name) ||
+  g_strcmp0 (output_name, "Primary") == 0)
 {
   gtk_combo_box_set_active_iter  (GTK_COMBO_BOX (object), );
   output_selected = TRUE;

--- xfce4-panel-4.12.1/panel/panel-window.c 2016-08-11 23:54:27.0 
+0200
+++ xfce4-panel-primary_for_4_12/panel/panel-window.c   2017-04-12 
18:33:27.0 +0200
@@ -2009,16 +2009,24 @@
 }
   else
 {
-  if (exo_str_is_empty (window->output_name))
+  if (g_strcmp0 (window->output_name, "Automatic") == 0
+  || window->output_name == NULL)
 {
-  normal_monitor_positioning:
-
   /* get the monitor geometry based on the panel position */
   monitor_num = gdk_screen_get_monitor_at_point (screen, 
window->base_x,
  window->base_y);
   gdk_screen_get_monitor_geometry (screen, monitor_num, );
   panel_return_if_fail (a.width > 0 && a.height > 0);
 }
+  else if (g_strcmp0 (window->output_name, "Primary") == 0)
+{
+  normal_monitor_positioning:
+  /* get the primary monitor */
+  monitor_num = gdk_screen_get_primary_monitor (screen);
+
+  gdk_screen_get_monitor_geometry (screen, monitor_num, );
+  panel_return_if_fail (a.width > 0 && a.height > 0);
+}
   else
 {
   /* check if we've stored the monitor number in the config or


Bug#871523: xfce4-panel: Multiple monitors: panel ignores the "main monitor"

2017-08-08 Thread Christian Buhtz
Package: xfce4-panel
Version: 4.12.1-2
Severity: normal

Dear Maintainer,

I have two monitors. In the display settings of xfce4 I can declare on of them
as the "main monitor". There is a check box for it. It doesn't matter in which
order the monitors are from the viewpoint of the BIOS. I use the second (from
BIOS) monitor as the "main" one. You can see a number in front of the monitor
name in the display settings. I use #2 as "main".

This work well, because "plank" for example only appears on the "main monitor".

The "panel" settings have an "Output" option. Per default it is set to
"automatic". IMO this means the "main monitor" should be used. But the panel
use the #1 monitor by default.
Currently I explicite set "Monitor 2" in that option to workaround this.

Usual it is ok if #1 one would be use when "Automatic" is set. BUT xfce4 itself
offers the concept of a "main monitor" in it's display settings. So each other
xfce-component should follow that concept, too.



-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.12.5-towo.1-siduction-amd64 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), 
LANGUAGE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages xfce4-panel depends on:
ii  exo-utils0.10.7-1
ii  libatk1.0-0  2.24.0-1
ii  libc62.24-14
ii  libcairo21.14.10-1
ii  libdbus-1-3  1.11.16+really1.10.22-1
ii  libdbus-glib-1-2 0.108-2
ii  libexo-1-0   0.10.7-1
ii  libfontconfig1   2.12.3-0.2
ii  libfreetype6 2.8-0.2
ii  libgarcon-1-00.6.1-1
ii  libgdk-pixbuf2.0-0   2.36.5-2
ii  libglib2.0-0 2.53.4-3
ii  libgtk2.0-0  2.24.31-2
ii  libice6  2:1.0.9-2
ii  libpango-1.0-0   1.40.6-1
ii  libpangocairo-1.0-0  1.40.6-1
ii  libpangoft2-1.0-01.40.6-1
ii  libsm6   2:1.2.2-1+b3
ii  libwnck222.30.7-5.1
ii  libx11-6 2:1.6.4-3
ii  libxext6 2:1.3.3-1+b2
ii  libxfce4ui-1-0   4.12.1-2
ii  libxfce4util74.12.1-3
ii  libxfconf-0-24.12.1-1

xfce4-panel recommends no packages.

xfce4-panel suggests no packages.

-- no debconf information