Bug 204442 - scim toolbar placement should default to desktop workarea
Summary: scim toolbar placement should default to desktop workarea
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: scim
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC7Blocker 210448
TreeView+ depends on / blocked
 
Reported: 2006-08-29 05:38 UTC by Matthias Clasen
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: scim-1.4.5-7.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-18 07:15:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
scim default and correct behaviour (182.85 KB, image/png)
2007-01-17 12:26 UTC, Ramakrishna Reddy Yekulla
no flags Details
The wrong position of the toolbar after rectivating scim (535.42 KB, image/png)
2007-01-17 12:45 UTC, Ramakrishna Reddy Yekulla
no flags Details

Description Matthias Clasen 2006-08-29 05:38:33 UTC
the scim toolbar popup by default pops up over the bottom panel, which is really
annoying, since the default panel layout has the workspace switcher in the covered
part fo the bottom panel. 

scim should respect the workspace area, and place its toolbar popup to not overlap
the panels. Another good idea would be to allow docking the popup inside the
panel, by having an applet that would house it.

Comment 1 Jens Petersen 2006-09-22 06:16:03 UTC
A Japanese Scim developer has already developed scim-panel-gnome
which allows docking the panel in the panel, but it is too late for fc6
inclusion.  It could probably go into extras soon though fwiw.

Do you have a better idea for the default initial position of the scim toolbar?
Above the workspace switcher also seems pretty annoying to me.
I think it is hard to a default position that everyone will like,
but luckily users are free to move it to where it is least intrusive for them.
Perhaps to the left of the notification area would be better: is there
a way to calculate that location?

If the default location should be away from the sides of the screen,
then the toolbar needs to be "locked" by default, so it stays and remembers
its horizontal position too, otherwise by default it jumps to the closer
side of the screen to stay out of the way.


Comment 2 Matthias Clasen 2006-09-22 13:35:40 UTC
I think having it in the bottom right corner is fine, if you can make it avoid the
panel. The easiest way to achieve that is probably to look for the _NET_WORKAREA
property on the root window (see the EWMH for details)

Comment 3 Jens Petersen 2006-09-27 04:43:17 UTC
Actually seems this should already be fixed in the stable cvs branch by Ashie.

Comment 4 Jens Petersen 2006-09-29 13:11:30 UTC
Though it doesn't seem to work for me on x86_64 at least.

Comment 5 Jens Petersen 2006-09-29 16:06:02 UTC
Nevermind, I think I know how to improve the algorithm now.

Comment 6 Jens Petersen 2006-10-17 08:46:57 UTC
(In reply to comment #2)
> The easiest way to achieve that is probably to look for the _NET_WORKAREA
> property on the root window (see the EWMH for details)

Perhaps I'm missing something obvious but I don't see the
property on the root window:

$ xprop | grep _NET_WORKAREA      # clicking on desktop background
$

Comment 7 Matthias Clasen 2006-10-17 15:56:36 UTC
the desktop background is not the real root window:

[mclasen@dhcp83-202 FC-6]$ xprop -root | grep "_NET_WORKAREA("
_NET_WORKAREA(CARDINAL) = 0, 26, 1920, 1148, 0, 26, 1920, 1148, 0, 26, 1920,
1148, 0, 26, 1920, 1148


Comment 8 Jens Petersen 2006-10-19 06:40:59 UTC
I suspect scim doesn't see the property since it starts before gnome.
If I turn off IM with im-chooser and I run scim-panel-gtk by hand on the desktop
the toolbar is placed correctly at the bottom right of the desktop workarea.

Is the X property set by gnome-panel?  Perhaps scim can be made to re-read
it when it needs to show the toolbar or at least if it wasn't set when it
initialized, though it can also be configured to always show the toolbar.


Comment 9 Jens Petersen 2006-10-19 06:58:45 UTC
(or maybe we should just enable scim gtkimm by default in gtk.immodules again
instead of xinputrc ;o)

Comment 10 Jens Petersen 2006-10-19 07:32:56 UTC
I guess the windowmanager sets _NET_WORKAREA.

Comment 11 Matthias Clasen 2006-10-19 13:40:02 UTC
Indeed, it is set by the window manager, and listening for changes of the
property and reacting to them is a good idea anyway (the user may rearrange his
panels, for instance...)

Comment 12 Jens Petersen 2006-11-09 08:29:16 UTC
A simple workaround seems to be delaying the startup of scim by "sleep 1".

Comment 13 Jens Petersen 2006-11-10 07:56:26 UTC
(In reply to comment #12)
> A simple workaround seems to be delaying the startup of scim by "sleep 1".

But this not robust enough since other gtk2 apps can trigger the scim panel too
early on.

I'm going to move the workarea check from ui_initialize to ui_settle_toolbar_window.

Comment 14 Jens Petersen 2006-11-13 08:23:10 UTC
patch sent upstream to scim-devel for comments

Comment 15 Jens Petersen 2006-11-17 08:26:21 UTC
Integrating improved patch by Ashie with a few more fixes in scim-1.4.5-3.fc7.

Comment 16 Jens Petersen 2006-12-06 05:14:38 UTC
The placement code needs to be improved to take account of the horizontal
workarea too not just vertical.

Comment 17 Jens Petersen 2006-12-15 08:38:41 UTC
The horizontal case should be fixed in 1.4.5-7.fc7.

Comment 18 Ramakrishna Reddy Yekulla 2007-01-17 12:26:10 UTC
Created attachment 145798 [details]
scim default and correct behaviour

Steps to reproduce ::
1. Activate SCIM [Ctrl + Space]
2. look for the scim toolbar being activated in its default position
3. Drag the scim-toolbar on to desktop
4. Deactivate SCIM [Ctrl + Space]
5. Again, activate scim again.
6. Look for the position of the toolbar
Observation
The scim toolbar must get back to its default position instead popping up where
it  was dragged intially. This fix seems to be working in this release

Comment 19 Ramakrishna Reddy Yekulla 2007-01-17 12:45:41 UTC
Created attachment 145801 [details]
The wrong position of the toolbar after rectivating scim

The wrong position of the scim-toolbar, which is annoying since it appears
randomly on the desktop.

Comment 20 Ryo Dairiki 2007-06-03 16:28:59 UTC
It seems like these patches for me. :(
For my opinion, the panel should not move by itself when auto-snap is disabled.
(Of course, it's okay to use this trick to determine the initial position just
after the installation) 

scim default and correct behaviour WHEN AUTO-SNAP IS DISABLED

Steps to reproduce ::
1. Activate SCIM [Ctrl + Space]
2. look for the scim toolbar being activated in its default position
3. Drag the scim-toolbar on to desktop
4. Deactivate SCIM [Ctrl + Space]
5. Again, activate scim again.
6. Look for the position of the toolbar
Observation
The scim toolbar MUST NOT get back to its default position instead popping up where
it  was dragged intially.

I will check this problem in detail, and report back with another patch later.

Comment 21 Jens Petersen 2007-06-04 03:01:42 UTC
Dairiki-san, I think this was it working correctly in FC6, right?
So it looks like a regression in F7: for me the panel is always in
the bottom right corner.  Could you please open a new bug for this?

Comment 22 Jens Petersen 2007-06-05 00:44:18 UTC
Dairiki-san, you're right: it seems
scim_panel_gtk-settle-toolbar-after-drag.patch
needs to be disabled now.

Comment 23 Jens Petersen 2007-06-05 03:39:47 UTC
I filed bug 242610 for the new issue.


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