Do

pidgin window focus

Asked by amirh

When Gnome-Do creates a new Pidgin conversation window, the new window isn't focused.
Is there a way to make new pidgin windows created through Gnome-Do focused?

Question information

Language:
English Edit question
Status:
Answered
For:
Do Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
David Siegel (djsiegel-deactivatedaccount) said :
#1

Yah, this is annoying, I know. If there is a way to do this, this is not a problem for Do to solve.

Revision history for this message
amirh (ahardon) said :
#2

I don't know c#, so I'm not trying to implement it, but from examining the Pidgin plugin, and libpurple,
it looks like this can be achieved by calling purple_conversation_set_ui_ops through dbus (PurpleConversationSetUiOps? ),
and giving it a PurpleConversationUiOps with has_focus set to true. Right after the call to PurpleConversationNew (in the Pidgin plugin).
Sorry for not implementing this myself as I said, I don't know c#, and don't know dbus.

Another, more "patchy" option is doing something like 'wmctrl -a <new conversation window title>' after the creation of the new conversation.
I think that in general an option to hook shell scripts with Do events, might be very useful (not only for this specific problem).

Thanks for this useful app, and sorry for not really helping...)-:

Revision history for this message
Jason Smith (jassmith) said :
#3

this can more correctly be done by using wnck-cil. However what David says is true, this is the window managers job. I am betting you are using compiz and its focus stealing prevention is biting you in the butt. Try disabling that and see how things go.

Revision history for this message
CydeSwype (ircone) said :
#4

did anyone confirm this is a bug in compiz? would love to see this resolved.

Revision history for this message
Alex Launi (alexlauni) said :
#5

I thought that I posted here a long time ago, this is not a bug in any window manager, this code is actually inside pidgin. They have a bunch of crazy focus stealing prevention so that unless you click on the buddy in the buddy list, the chat window doesn't come to focus, you could do it with wnck, but it'd be better if we patched pidgin to allow us to bypass the focus stealing prevention. I talked to the pidgin devs and they said they would accept a patch, they just weren't wanting to write it themselves. This should be a simple patch, we just need to add an optional bool to one of the dbus methods for creating a chat (forget which, will look later) that will enable/disable focus stealing prevention.

Revision history for this message
CydeSwype (ircone) said :
#6

Is there a bug ticket for this? Something we can follow with status? Would love to see this fix happen. I love my gnome-do but hate that it doesn't focus the pidgin window. Also, let's make sure that if I DO have a pidgin window already open and I have tabbed conversations on, and I gnome-do someone in pidgin, that the correct tab INSIDE the pidgin window is also focused. Right now, after opening a conversation with a new person via gnome-do, I have to click on the pidgin window to focus and THEN click on the tab for the person I'm trying to talk to.

Revision history for this message
garijon (garijon) said :
#9

Anybody knows if this is being worked on ?

Revision history for this message
Aaron Tinio (aptinio) said :
#10

In Ubuntu 9.10 Karmic, with Compiz enabled, setting Focus Prevention Level to Off fixed this for me:

CompizConfig Setting Manager > General > General Options > Focus & Raise Behaviour > Focus Level Prevention: Off

Revision history for this message
CydeSwype (ircone) said :
#11

Holy god...Aaron, that trick totally worked a charm! Are there any side-effects to doing this? What the heck is this setting for anyway? What exactly would be stealing the focus from whatever is supposed to have it?

Revision history for this message
Michał Stolarski (michal-stolarski) said :
#12

Aaron! Thanks!

I know this is an old thread, but man was I looking for this answer!

Cheers,
Mike

Can you help with this problem?

Provide an answer of your own, or ask amirh for more information if necessary.

To post a message you must log in.