How to lock the position of the floating icon?

Asked by Sean Murphy on 2014-11-11

I am attempting to use Onboard on a touchscreen kiosk system. I'm using the floating icon to allow the user to show/hide the keyboard, but I find that when I touch the icon I end up moving it more often than I click it on the first try, which is not what I want. Is there any way to use gsettings to fix the floating icon permanently to a position on the screen, disabling the dragging of the window?

I also have a problem when I connect a larger monitor to the kiosk to do maintenance, and then move the icon. When I disconnect the larger monitor, the icon stays at the same absolute position it was at on the large monitor. This means the icon is off-screen and the only way to get it back is to modify gsettings. I think locking the position would solve both problems.

Question information

Language:
English Edit question
Status:
Solved
For:
Onboard Edit question
Assignee:
No assignee Edit question
Solved by:
Sean Murphy
Solved:
2014-11-14
Last query:
2014-11-14
Last reply:
2014-11-12
marmuta (marmuta) said : #1

Resizing can be blocked easily, in Preferences->Window->Resize Protection, but not moving, unfortunately. However you could adjust (abuse) something called "drag protection":

gsettings set org.onboard.universal-access drag-threshold 100

That's the distance in pixels the pointer has to travel before the drag begins, default is -1 for the system's drag&drop threshold. If set high enough it would essentially disallow all movement. It would stop resizing too though, and for both, floating icon and keyboard window, since there's only a single threshold for all drag operations.

The icon getting stuck off-screen is a known problem. A proper fix would probably have to remember positions for all encountered permutations of connected monitors. I'm not sure that will ever be done, though. I guess what we can do, is to make sure the icon at least moves to the edge of the closest visible monitor-area.

In your case, if you don't move the floating icon while the the secondary monitor is connected, does the icon still end up off-screen?

marmuta (marmuta) said : #2

I've extended the resize protection to include window movement. There is still only a course setting in preferences->window->resize protection that affects both floating icon and keyboard window. However you get more fine grained control from command line.

To turn off all resizing and movement for the floating icon run
gsettings set org.onboard.icon-palette window-handles ""

To turn off all resizing and movement for the keyboard window:
gsettings set org.onboard.window window-handles ""

This is only in trunk (rev. 1822) for now, but it will at some point show up in our snapshot PPA at
https://launchpad.net/%7Eonboard/+archive/snapshots

Sean Murphy (murph269) said : #3

Great, thanks.