! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Panel does not change monitors when one is disabled with xrandr 1.2 and xinerama
Status:
RESOLVED: FIXED
Product:
Xfce4-panel

Comments

Description Henk Boom 2007-10-23 04:28:28 CEST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.7) Gecko/20071013 Firefox/2.0.0.7
Build Identifier: 

I use xinerama and the new xrandr 1.2 features to add and remove external monitors on my laptop without restarting X. Normally, when I de-activate the external monitor all windows are moved to be at least partially within the remaining monitor, to prevent them from getting lost. The XFCE panel, however, does not move back onto the remaining screen on de-activation, and is lost until I re-connect the screen and move it back manually.

Reproducible: Always

Steps to Reproduce:
1. Plug a monitor into the laptop VGA port and issue the commands:
xrandr --output LVDS --mode 1024x768 # make sure the laptop LCD stays on
xrandr --output VGA --mode 1024x768
xrandr --output VGA --left-of LVDS
2. Move the xfce panel to the VGA screen in the right click->Customize Panel menu.
3. Disable the external monitor with:
xrandr --output LVDS --mode 1024x768 # still make sure the LCD is on. . .
xrandr --output VGA --off

Actual Results:  
The Panel is no longer visible even though all other windows are moved onto the remaining monitor automatically, and I must regain it by re-activating the VGA monitor and moving it back before de-activating it.

Expected Results:  
I expected the panel to move to the remaining monitor when the monitor is de-activated.

emerge -vpq gtk+ glib
[ebuild   R   ] x11-libs/gtk+-2.10.14  USE="X doc jpeg tiff xinerama -debug" 
[ebuild   R   ] dev-libs/glib-2.12.13  USE="-debug -doc -hardened"
Comment 1 Henk Boom 2007-10-25 05:12:39 CEST
Just wanted to add that this does _not_ happen if I log in while already having both screens active.
Comment 2 Jasper Huijsmans editbugs 2007-12-29 09:52:36 CET
There are lots of problems with the new xrandr, I'm afraid. I guess we'll have to wait for Gtk to support this.
Comment 3 Olivier Fourdan editbugs 2008-10-20 11:22:30 CEST
Well actually gtk support this and that causes the panel to crash.

The list of monitors is dynamic (monitors can be added/removed dynamically) and sometimes changing the resolution causes the display to switch to another monitor.

When that happens, the "monitor_list" of the panel contains deprecated data and causes a crash in the panel:

(xfce4-panel:28332): Gdk-CRITICAL **: get_monitor: assertion `monitor_num < screen_x11->n_monitors' failed

[1]+  Segmentation fault      (core dumped) xfce4-panel


(gdb) bt
#0  0x005b5999 in gdk_screen_get_monitor_geometry () from /usr/lib/libgdk-x11-2.0.so.0
#1  0x08051736 in monitor_size_changed (screen=0x9ca70d0) at panel-app.c:433
#2  0x0076b964 in g_cclosure_marshal_VOID__VOID () from /lib/libgobject-2.0.so.0
#3  0x0075e1db in g_closure_invoke () from /lib/libgobject-2.0.so.0
#4  0x00774625 in ?? () from /lib/libgobject-2.0.so.0
#5  0x00775d3c in g_signal_emit_valist () from /lib/libgobject-2.0.so.0
#6  0x0077605d in g_signal_emit_by_name () from /lib/libgobject-2.0.so.0
#7  0x005b67d1 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#8  0x005a9508 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#9  0x005a9d23 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#10 0x005aa14f in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#11 0x007da208 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#12 0x007dd8b3 in ?? () from /lib/libglib-2.0.so.0
#13 0x007dddd2 in g_main_loop_run () from /lib/libglib-2.0.so.0
#14 0x0028d459 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#15 0x08051d4a in panel_app_run (client_id=0x0) at panel-app.c:751
#16 0x0804f4af in main (argc=1, argv=0xbf96ecc4) at main.c:154
Comment 4 Olivier Fourdan editbugs 2008-10-21 11:33:16 CEST
Created attachment 1911 
Fix crash with gtk+-2.14/xrandr 1.2

This patch fixes the crash mentioned above by checking the monitor number, please consider for inclusion in beta2.
Comment 5 Nick Schermer editbugs 2008-10-21 12:58:53 CEST
Free free to commit this patch.
Comment 6 Nick Schermer editbugs 2008-10-21 12:59:12 CEST
Err, feel free..
Comment 7 Nick Schermer editbugs 2008-10-28 10:43:39 CET
Olivier, is this bug fixed now?
Comment 8 Olivier Fourdan editbugs 2008-10-28 21:50:44 CET
Err, no, I fixed a crash, fixing this bug requires more work, as the panel keeps a separate list of monitors.
Comment 9 Nick Schermer editbugs 2009-02-01 10:23:11 CET
Not going to fix this in the 4.6 release. It just requires too much changes in the monitor code. Will try to fix this in the 4.8 release.
Comment 10 Nick Schermer editbugs 2009-05-25 07:09:01 CEST
New code will move the panel to the active monitor unless the output-name property is set. In that case the panel will hide until the output is activated again.
Comment 11 Nick Schermer editbugs 2010-02-27 15:09:02 CET
Devel branch has been merged in master. A 4.7.0 release will follow soon. If you think this bug is not fixed? Feel free to reopen the bug.

Bug #3620

Reported by:
Henk Boom
Reported on: 2007-10-23
Last modified on: 2010-02-27

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Attachments

Fix crash with gtk+-2.14/xrandr 1.2 (711 bytes, patch)
2008-10-21 11:33 CEST , Olivier Fourdan
no flags

Additional information