Bug 217042 - Scim toolbar does not work when focus follows mouse
Summary: Scim toolbar does not work when focus follows mouse
Alias: None
Product: Fedora
Classification: Fedora
Component: scim   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Hu Zheng
QA Contact:
Keywords: i18n, MoveUpstream
Depends On:
TreeView+ depends on / blocked
Reported: 2006-11-23 12:17 UTC by Jan "Yenya" Kasprzak
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-31 02:11:45 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Jan "Yenya" Kasprzak 2006-11-23 12:17:04 UTC
Description of problem:
When the window manager is set to the "follow-mouse" focus (as opposed to
"click to focus"), the scim toolbar is unusable, because moving mouse over
the toolbar causes the loss of focus of the previous window, which then makes
the scim toolbar disappear. It is even more interesting when the toolbar is
actually above the window, it then appears and disappears in a loop.

It is interesting that for example scim-anthy's popup window with a list of
possible completions does not have this property, and does not cause a loss of
focus of the window in question.

Version-Release number of selected component (if applicable):

$ rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n' |grep scim

Comment 1 Jens Petersen 2006-11-27 08:06:08 UTC
Hmm, I see what you mean.  Are you using metacity or another window manager
that supports "sloppy focus" mode.  Metacity with sloppy mode seems to be ok
and still lets you focus by moving the mouse.

Comment 2 Jan "Yenya" Kasprzak 2006-11-27 10:16:01 UTC
I use Sawfish.

I have switched from enter-exit focus to enter-only, and it works as expected,

However, it would be nice if the toolbar could work with enter-exit focus as
well. I vaguely remember I have chosen to not use enter-only focus for some
reason, but I am not sure what it was.

Comment 3 Jens Petersen 2006-11-28 05:38:34 UTC
Alternatively you could set the scim toolbar always to be visible
if you want to use it with the mouse.

Comment 4 Jan "Yenya" Kasprzak 2006-11-30 12:22:46 UTC
I have found why I don't want enter-only focus: I use dual-head setup, and I
want the focus to be removed from the window when I move the cursor to the other
head (even though there is no window focused on the other head). This way the
correct head gets the keyboard shortcuts like switching workspaces, etc. With
enter-only, the shortcuts are still being sent to the previous head.

When the toolbar is set to be always visible (with enter-exit focus), it is not
possible to use all its functions, because as soon as the mouse/focus leaves the
original window, some buttons on the toolbar disappear (namely the "input mode"
and "conversion mode" buttons).

Comment 5 Jens Petersen 2006-12-01 04:16:14 UTC
Ok, thanks, fair points.

What feature(s) do you need most from the toolbar btw?

Comment 6 Hu Zheng 2007-01-30 08:40:52 UTC
I think this should be sawfish's problem but not scim.
I tried metacity's sloppy mode, it won't change the focus when you move the
mouse to the scim toolbar, as the toolbar is a popup window. But as you figure
out, sawfish will move the focus even when the scim toolbar is a popup window,
so this should be sawfish's problem. Sawfish is too old, it may don't follow the
newest gtk popup window rule.
I have check the code of creating input window and toolbar window in

        _input_window = gtk_window_new (GTK_WINDOW_POPUP);
        gtk_widget_modify_bg (_input_window, GTK_STATE_NORMAL, &_normal_bg);
        gtk_window_set_policy (GTK_WINDOW (_input_window), TRUE, TRUE, FALSE);
        gtk_window_set_resizable (GTK_WINDOW (_input_window), FALSE);
        gtk_widget_add_events (_input_window,GDK_BUTTON_PRESS_MASK);
        gtk_widget_add_events (_input_window,GDK_BUTTON_RELEASE_MASK);
        gtk_widget_add_events (_input_window,GDK_POINTER_MOTION_MASK);

        _toolbar_window = gtk_window_new (GTK_WINDOW_POPUP);
        gtk_window_set_policy (GTK_WINDOW (_toolbar_window), TRUE, TRUE, FALSE);
        gtk_window_set_resizable (GTK_WINDOW (_toolbar_window), FALSE);
        gtk_widget_add_events (_toolbar_window,GDK_BUTTON_PRESS_MASK);
        gtk_widget_add_events (_toolbar_window,GDK_BUTTON_RELEASE_MASK);
        gtk_widget_add_events (_toolbar_window,GDK_POINTER_MOTION_MASK);

So you will find the codes to create input window and toolbar window are the
same, both are popup window. But it is strange sawfish deal with input window as
popup window but not the same on toolbar window. So this should be sawfish's
bug. I have reported it, see http://bugzilla.gnome.org/show_bug.cgi?id=402386

Note You need to log in before you can comment on or make changes to this bug.