Bug 122981 - Background settings ignore Xinerama hint changes
Summary: Background settings ignore Xinerama hint changes
Status: CLOSED UNMAINTAINED
Alias: None
Product: kdesktop
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-02 17:52 UTC by Isaac Wilcox
Modified: 2009-01-02 20:32 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Working, external monitor present (232.27 KB, image/jpeg)
2006-03-02 17:54 UTC, Isaac Wilcox
Details
Working, just laptop screen (98.01 KB, image/jpeg)
2006-03-02 17:54 UTC, Isaac Wilcox
Details
Broken, after re-attaching external monitor (215.92 KB, image/jpeg)
2006-03-02 17:55 UTC, Isaac Wilcox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Isaac Wilcox 2006-03-02 17:52:54 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Debian testing/unstable Packages

Hi,

I use the XFree ati driver with its "mergedfb" support on my laptop.  MergedFB allows me to dynamically change the screen layout (and therefore dynamically change the Xinerama hints).  I regularly add/remove an external monitor, running xrandr to inform X of the change.  The pager and kicker deal with this just fine.  I use the kcmbackground setting "All Desktops", "On each screen" and "Scale and crop" which works nicely for my two monitors even though they have different sizes and aspect ratios, but things mess up if I remove my second monitor and add it again.

The two monitor layouts that I'm changing between are (according to xrandr):

  SZ:    Pixels          Physical       Refresh
  0   1024 x 768    ( 650mm x 289mm )   -25873
  1   2304 x 1024   ( 650mm x 289mm )   -21138

A few pictures will help to describe the bug.  Attached are 3 pics that show how things go from working to broken.  They are:

 1: shows external monitor plugged in with everything working fine (the black bit is an artefact of the size mismatch between my laptop screen and external monitor)

 2: shows how things look after I've removed the external monitor and run xrandr -s 0, with everything working fine

 3: shows how things look after I've re-attached the external monitor and run xrandr -s 1; here the background isn't doing what I asked for, and this is the bug

I can fix the situation (i.e. change pic 3 back to pic 1) by doing the following:
 - fire up kcmbackground
 - drop down "Setting for desktop" ... "On Each Screen" and change it to "Across All Screens"
 - hit "Apply"
 - drop down "Across All Screens" and change it back to "On Each Screen"
 - hit "Apply"
and presto, fixed.  So maybe the KDE component managing the background is just failing to listen for changes in Xinerama hints, or maybe some other KDE component that is aware of dynamic Xinerama is failing to inform the right people, or maybe it's something completely different.

I appreciate that it might be a pain to get your hands on a MergedFB machine - I'll happily test any patches you want to write blindly and throw my way :)

For some background on mergedfb, in case it's unfamiliar, see:
  http://www.winischhofer.at/linuxsispart2.shtml#mergedfbmode
and scroll down a bit.

Cheers,

Zak
Comment 1 Isaac Wilcox 2006-03-02 17:54:00 UTC
Created attachment 14926 [details]
Working, external monitor present
Comment 2 Isaac Wilcox 2006-03-02 17:54:42 UTC
Created attachment 14927 [details]
Working, just laptop screen
Comment 3 Isaac Wilcox 2006-03-02 17:55:39 UTC
Created attachment 14928 [details]
Broken, after re-attaching external monitor
Comment 4 Isaac Wilcox 2006-04-07 18:37:55 UTC
After a little investigation it appears it's got nothing to do with ignoring Xinerama events.  QT provides a signal and kdesktop duly binds it to KBackgroundManager::desktopResized(), and it definitely gets called.  The problem is that KBackgroundManager::desktopResized() is just somehow failing to do all it should.  Whatever it is that's being forgotten at resize time is covered when a full config reparse happens, so it's a matter of finding out what and making sure desktopResized() does it too.

This annoys me enough that I'm working around it (not quite enough to make me fix it yet though :) ).  I use an ACPI hotkey on my laptop to toggle the external monitor, so I've just added the following to the hotkey script after my xrandr call:
  KDESKTOPRC=$HOME/.kde/share/config/kdesktoprc
  perl -p -i -e 's/^(DrawBackgroundPerScreen_\d)=true/$1=false/' $KDESKTOPRC
  dcop kdesktop KBackgroundIface configure
  perl -p -i -e 's/^(DrawBackgroundPerScreen_\d)=false/$1=true/' $KDESKTOPRC
  dcop kdesktop KBackgroundIface configure
Comment 5 Sandro Steger 2008-10-02 23:20:03 UTC
See https://bugs.kde.org/show_bug.cgi?id=133378
Comment 6 FiNeX 2008-12-10 02:07:19 UTC
Kdesktop is no more mantained. Fortunatly this bug seems not to be valid for KDE 4. Please reopen if this bug is not a kdesktop one (and it is not solved) or it can be reproduced on KDE 4.
Comment 7 FiNeX 2009-01-02 20:32:25 UTC
Bug closed. Kdesktop is no more mantained.