cellwriter takes focus, input goes nowhere

Bug #333054 reported by Michael Flaig
2
Affects Status Importance Assigned to Milestone
CellWriter
Fix Released
Undecided
Michael Flaig

Bug Description

With current ubuntu jaunty, compiz on and using emerald I have the problem that cellwriter get's the focus when entering text.

When pressing enter the input goes nowhere, same for the keyboard.
a) cellwriter should not send the input to nowhere or itself in the first place
b) cellwriter should not get the focus as it was before

onboard and matchbox-keyboard however are working right and do not get the focus, therefore sending the keys to the right application, so I assume a problem in cellwriter, not emerald.

Revision history for this message
Michael Flaig (mflaig) wrote :

Although onboard and matchbox keyboard working right I think this is a compiz problem in current jaunty. If I disable compiz cellwriter works as expected. Anyway please look into this and mybe link it to compiz as well, please!?

Revision history for this message
Michael Levin (risujin) wrote :

I don't have a machine running Ubuntu or compiz, so I can't test this directly but I think it has to do with your window manager. In order to avoid getting focus, CellWriter calls:

gtk_window_set_accept_focus(GTK_WINDOW(window), FALSE);

I've noticed that some window managers (or with certain settings in any case), will ignore this and prevent CellWriter from functioning properly. Check your window manager's settings for focus stealing prevention and respecting focus hints. If that does not help, try a different window manager to see if that helps.

There is no way to actually force the window manager to change focus. The best CellWriter can do is set this hint and hope it is respected. I believe onboard and matchbox will accept focus but do not send their key stroke output through the same mechanism that CellWriter uses. They have some method of finding out what window was focused last, I am not exactly sure how. I will have to look at these programs to see how they deliver their keystrokes and see if this method supports Unicode etc. If so, it would be a good idea to implement the same functionality in CellWriter.

Revision history for this message
Michael Flaig (mflaig) wrote : Re: [Bug 333054] Re: cellwriter takes focus, input goes nowhere

> I don't have a machine running Ubuntu or compiz, so I can't test this
> directly but I think it has to do with your window manager. In order to
> avoid getting focus, CellWriter calls:
>
> gtk_window_set_accept_focus(GTK_WINDOW(window), FALSE);
>
> I've noticed that some window managers (or with certain settings in any
> case), will ignore this and prevent CellWriter from functioning
> properly. Check your window manager's settings for focus stealing
> prevention and respecting focus hints. If that does not help, try a
> different window manager to see if that helps.

I did some more testing and filed a bug report against compiz
See: https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/341092

Metacity does it right and cellwriter works as expected. Even if you
enable compiz in that session cellwriter works right, however at the
next login compiz (with gtk-window-decorator or emerald) gives
cellwriter the focus.

> There is no way to actually force the window manager to change focus.
> The best CellWriter can do is set this hint and hope it is respected. I
> believe onboard and matchbox will accept focus but do not send their key
> stroke output through the same mechanism that CellWriter uses. They have
> some method of finding out what window was focused last, I am not
> exactly sure how. I will have to look at these programs to see how they
> deliver their keystrokes and see if this method supports Unicode etc. If
> so, it would be a good idea to implement the same functionality in
> CellWriter.

Did you have time already to look into onboard's source?

I noticed that onboard doesn't accepted the focus as well, however
onboard does also seem to work right with compiz enabled.

Revision history for this message
Michael Flaig (mflaig) wrote :

As the opencompositing guys didn't get the same effect I checked every setting in ccsm again and by enabling the glib main loop support it seems that the problem is now gone. I did this before but enabling glib main loop actually needs a session restart to take effect.

I will close the bug report with this comment. Hopefully this report helps others running in the same problem to solve it more quickly...

Revision history for this message
Michael Flaig (mflaig) wrote :

fix was enabling glib main loop support and restarting the session afterwards

Changed in cellwriter:
assignee: nobody → mflaig
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.