#572391 libgtk2.0-0: gtk-based apps are unaware of screen resolution across monitor plug/unplug

Package:
libgtk2.0-0
Source:
gtk+2.0
Description:
GTK graphical user interface library - old version
Submitter:
Daniel Kahn Gillmor
Date:
2010-03-03 22:03:08 UTC
Severity:
normal
#572391#5
Date:
2010-03-03 21:57:04 UTC
From:
To:
This might be related to #498848 (http://bugs.debian.org/498848)

I have a dual monitor setup with a 1280x1024 external VGA monitor
positioned logically "above" my 1024x600 laptop screen.  when i run
xrandr while the VGA monitor is disconnected, xrandr is aware that the
monitor is unplugged, but does not change the size of the virtual
screen.

gtk-based apps appear to make use of the connected/disconnected
information during the last run of xrandr, not based on the actual
state of currently plugged hardware.  i've tested this with both gedit
and evince.

if you think this is a bug in xrandr or somewhere else, feel free to
re-assign.

here's how to reproduce:

 0) plug in external monitor, extend desktop into that monitor.

 1) launch gedit, position on external monitor, pull down file menu.
 works fine.  dismiss file menu.

 2) unplug external monitor, run "xrandr" with no arguments

 3) plug external monitor back in.

 4) try to pull down file menu: item in menubar highlights, menu does
 not show.  gedit spews the following error message:

(gedit:3189): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width 245 and height -629

    (the height value (-629 here) will depend on the vertical position
    of the gedit window)

 5) "dismiss" the non-existent menu by hitting ESC.

 6) run "xrandr" with no arguments

 7) try to pull down file menu.  it works again.

Thanks for maintaining gtk in debian!