Bug 204442 - scim toolbar placement should default to desktop workarea
scim toolbar placement should default to desktop workarea
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: scim (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
: i18n
Depends On:
Blocks: FC7Blocker 210448
  Show dependency treegraph
 
Reported: 2006-08-29 01:38 EDT by Matthias Clasen
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: scim-1.4.5-7.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-01-18 02:15:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Matthias Clasen 2006-08-29 01:38:33 EDT
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 02:16:03 EDT
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 09:35:40 EDT
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 00:43:17 EDT
Actually seems this should already be fixed in the stable cvs branch by Ashie.
Comment 4 Jens Petersen 2006-09-29 09:11:30 EDT
Though it doesn't seem to work for me on x86_64 at least.
Comment 5 Jens Petersen 2006-09-29 12:06:02 EDT
Nevermind, I think I know how to improve the algorithm now.
Comment 6 Jens Petersen 2006-10-17 04:46:57 EDT
(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 11:56:36 EDT
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 02:40:59 EDT
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 02:58:45 EDT
(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 03:32:56 EDT
I guess the windowmanager sets _NET_WORKAREA.
Comment 11 Matthias Clasen 2006-10-19 09:40:02 EDT
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 03:29:16 EST
A simple workaround seems to be delaying the startup of scim by "sleep 1".
Comment 13 Jens Petersen 2006-11-10 02:56:26 EST
(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 03:23:10 EST
patch sent upstream to scim-devel for comments
Comment 15 Jens Petersen 2006-11-17 03:26:21 EST
Integrating improved patch by Ashie with a few more fixes in scim-1.4.5-3.fc7.
Comment 16 Jens Petersen 2006-12-06 00:14:38 EST
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 03:38:41 EST
The horizontal case should be fixed in 1.4.5-7.fc7.
Comment 18 Ramakrishna Reddy Yekulla 2007-01-17 07:26:10 EST
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 07:45:41 EST
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 12:28:59 EDT
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-03 23:01:42 EDT
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-04 20:44:18 EDT
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-04 23:39:47 EDT
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.