Issue 400 in xmonad: LayoutHints don't respect windows' hint changes without changing the workspace state

Status: New Owner: ---- New issue 400 by aleks.dimitrov: LayoutHints don't respect windows' hint changes without changing the workspace state http://code.google.com/p/xmonad/issues/detail?id=400 What steps will reproduce the problem? 1. Use a minimal configuration like: main = xmonad $ defaultConfig { layoutHook = layoutHints (XMonad.Tall 1 (1/2) (3/100)) } 2. Open Rhythmbox and press CTRL-D (to collapse the view to 'compact view') 3. Change the workspace state (toggle struts, change focus, launch stuff) What is the expected output? What do you see instead? I'd like XMonad to recognize Rhythmbox' state change without re-evaluation of the workspace state. XMonad however doesn't seem to be notified of Rhythmbox' preferred size, or maybe just doesn't react to it. Here's a couple of screenshots to illustrate the problem: http://imgur.com/THPdml&y5e0U&r6n58 First image shows what happens when RBX changes its appearance and XMonad doesn't react (these huge grey windows are exactly what I'm trying to avoid using hinted layouts.) Second image shows the desktop after a state change. That's what I'd like to see! Third image shows RBX expanding to its extended view again, but the window doesn't get bigger! It stays small and requires a workspace state change to go back to normal. What version of the product are you using? On what operating system? xmonad 0.9.1 (Ubuntu 10.04) Are you using an xmonad.hs? Please attach it and the output of "xmonad --recompile". Minimal reproducing config:
import XMonad import XMonad.Layout.LayoutHints main = xmonad $ defaultConfig { layoutHook = layoutHints (XMonad.Tall 1 (1/2) (3/100)) }
xmonad --recompile remains silent :-)

Comment #1 on issue 400 by liskni.si: LayoutHints don't respect windows' hint changes without changing the workspace state http://code.google.com/p/xmonad/issues/detail?id=400 I use this to solve the issue:
myEventHook (PropertyEvent { ev_event_type = t, ev_atom = a }) | t == propertyNotify && a == wM_NORMAL_HINTS = do refresh return $ All True myEventHook _ = mempty
I wrote it only yesterday and I was going to propose a patch to xmonad or xmc with this. I promise to do it tomorrow :-)

Comment #2 on issue 400 by aleks.dimitrov: LayoutHints don't respect windows' hint changes without changing the workspace state http://code.google.com/p/xmonad/issues/detail?id=400 That looks awesome. I'm at work & can't try out if it solves my issue right now, but just from looking at your code, it certainly should. If you could work this into a patch that would be nice. I won't be able to look at some code until the end of this week :-|

Comment #3 on issue 400 by liskni.si: LayoutHints don't respect windows' hint changes without changing the workspace state http://code.google.com/p/xmonad/issues/detail?id=400 http://www.haskell.org/pipermail/xmonad/2010-July/010381.html

Updates: Status: Fixed Owner: vogt.adam Labels: Component-Contrib Type-Defect Comment #4 on issue 400 by vogt.adam: LayoutHints don't respect windows' hint changes without changing the workspace state http://code.google.com/p/xmonad/issues/detail?id=400 I've pushed Tomas's patch that adds hintsEventHook. The size hints are respected immediately, though rhythmbox seems to respond to about every other Ctrl-D here (mouse response is 100% though).

Comment #5 on issue 400 by liskni.si: LayoutHints don't respect windows' hint changes without changing the workspace state http://code.google.com/p/xmonad/issues/detail?id=400 I noticed that some apps (e.g. urxvt) update the hints more often than needed (3 times for each size change, even if the hint only specifies size increments, with urxvt) which slows down xmonad considerably. I had to change my hook to only refresh with certain apps. Perhaps some kind of caching the last hint state and checking if it changed may be a clean solution.
participants (1)
-
codesite-noreply@google.com