Adam Sjøgren
2012-09-13 11:47:34 UTC
Usually I have my Pidgin window iconified. I have configured Pidgin to
set the URGENT hint when a new message arrives. I would like the window
to be de-iconified when that happens.
My first attempt to write an UrgencyFunc to achieve this was:
DestroyFunc UrgencyFunc
AddToFunc UrgencyFunc
+ I Iconify off
This works, but has the drawback that the de-iconified window gains
focus - which I do not want (I'm often typing into another window when
this happens).
So I tried this instead:
DestroyFunc UrgencyFunc
AddToFunc UrgencyFunc
+ I FlipFocus
+ I Iconify off
+ I Prev (AcceptsFocus) Focus
This works as I want it to _except_ when the Pidgin window is already
de-iconified and has focus.
In that case, when a new message is received, the previous window gains
focus, and I end up typing into another window than the Pidgin window.
Usually mid-sentence.
I am probably going about this in a backwards way, so any ideas for a
good solution are very welcome.
If I could test whether the window with the URGENT hint has focus and do
nothing in the UrgencyFunc, I think I would be home free - but there are
probably other solutions.
Best regards,
Adam
set the URGENT hint when a new message arrives. I would like the window
to be de-iconified when that happens.
My first attempt to write an UrgencyFunc to achieve this was:
DestroyFunc UrgencyFunc
AddToFunc UrgencyFunc
+ I Iconify off
This works, but has the drawback that the de-iconified window gains
focus - which I do not want (I'm often typing into another window when
this happens).
So I tried this instead:
DestroyFunc UrgencyFunc
AddToFunc UrgencyFunc
+ I FlipFocus
+ I Iconify off
+ I Prev (AcceptsFocus) Focus
This works as I want it to _except_ when the Pidgin window is already
de-iconified and has focus.
In that case, when a new message is received, the previous window gains
focus, and I end up typing into another window than the Pidgin window.
Usually mid-sentence.
I am probably going about this in a backwards way, so any ideas for a
good solution are very welcome.
If I could test whether the window with the URGENT hint has focus and do
nothing in the UrgencyFunc, I think I would be home free - but there are
probably other solutions.
Best regards,
Adam
--
"Hur långt man än har kommit Adam Sjøgren
är det alltid längre kvar" ***@koldfront.dk
"Hur långt man än har kommit Adam Sjøgren
är det alltid längre kvar" ***@koldfront.dk