Gnome application responses to screen size changes

Keith Packard keithp at keithp.com
Thu Apr 12 06:46:15 PDT 2007


On Thu, 2007-04-12 at 22:37 +1200, Andrew McMillan wrote:

> ==================================================
> #!/bin/sh
> 
> CONNECTED="`xrandr | grep "VGA connected" `"
> 
> if [ "${CONNECTED}" = "" ]; then
>   # Disable second monitor
>   xrandr --output VGA --off
> else
>   # Enable second monitor
>   xrandr --output VGA --auto --pos 1400x0 --right-of LVDS
> fi

I recently fixed xrandr so you should be able to do

   xrandr --auto --output VGA --auto --right-of LVDS

This should turn the VGA off when disconnected and on when connected.

> Whenever that VGA output gets enabled all of my gnome-panels seem to
> want to mosey on over and check out all those new pixels, and I have to
> drag them back to the laptop panel.

That's because the VGA ends up as Xinerama screen 0, which is where
Gnome always sticks the panel. Reordering the Xinerama screens is
trivial inside the X server, but I haven't figured out a decent way to
express that on the wire. It seems like we just need a request to
reorder outputs in the RandR list, then have RandR use that to order the
Xinerama screens.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20070412/80b54e09/attachment.pgp>


More information about the xorg mailing list