Make Onboard aware of rotating screen

Bug #911821 reported by Francesco Fumanti
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Onboard
Fix Released
Undecided
Unassigned

Bug Description

Marnix asked the following question about Onboard:

On my tablet, after rotating the screen, a piece of the keyboard falls outside the display area. I'm able to reposition and rescale onboard using "onboard-settings -x XX -y YY ...". However, the settings dialog will always show after this command. Is there a way to prevent the dialog from showing?

Best Regards,
Marnix

Revision history for this message
Francesco Fumanti (frafu) wrote :

I wonder whether Onboard can be made aware of rotating screen and be enhanced so that it automatically changes position after the screen has rotated. Currently, Onboard saves only one user position; maybe that it has to be enhanced so that it saves a position for the screen in landscape position and another one for the screen in portrait position.

Revision history for this message
marmuta (marmuta) wrote :

We could probably store two positions/sizes, one for horizontal and one for vertical orientation. I've checked the RANDR extension, it can be queried for rotation and sends notifications on changes. This could go into the osk extension.

Alternatively we could have a mode where onboard stretches from screen edge to screen edge like in the screensaver unlock screen and it would adapt to rotation automatically too. I guess on a tablet you would like to have the keys as large as possible, which would mean filling the whole screen width anyway.

This would probably need aspect ratio correction to unsquish the keys, but we have that now (just currently disabled).

Any thoughts?

Revision history for this message
marmuta (marmuta) wrote :

Marnix, I'm curious, what kind of tablet are you using?

Revision history for this message
Marnix Pikkemaat (marnix-3) wrote :

I'm using an Acer Iconica Tab w500 (it comes with windows 7 by default). It runs Ubuntu fine on a dual 1GHz amd64 processor. I've created a script and a launcher for rotating the screen, and what you're describing above is exactly what I was trying to achieve.

As for the choice between storing positions and stretching, I would prefer the storing positions for horizontal and vertical layout. One problem one would face using a stretch mode I learned would be the unity sidebar overlapping the keyboard.

When storing two sets of position/size, you could indeed translate the position from current orientation to the new orientation when it does not yet exist, so that on first rotate the keyboard would appear to be in the same position. I still think though, that many users are picky enough to want to be able to control the position in the new orientation too.

If you would like some testing done, please let me know. I'm not a python programmer, but I use google well enough ;)

Revision history for this message
marmuta (marmuta) wrote :

Trunk has this now. There are two independent positions/sizes, one for landscape and one for portrait screens. Both, keyboard window and floating icon have this.

Marnix, it would be great if you could test this with your tablet. The next release will be done soon.

Changed in onboard:
status: New → Fix Committed
Revision history for this message
Marnix Pikkemaat (marnix-3) wrote :

Hi Marmuta,

my apologies for the delay, I've been away on holiday, and was swamped with work when I got back. I've tried the trunk, and two things went wrong:

first: rotating the screen from landscape (default) to portrait works fine, but rotating it back makes onboard move to another workspace.
second: trying to open onboard-settings results in an error: in settings.py on line 3, import gtk.glade: ImportError: no module called glade. (I could not find a glade/python package in synaptic, so I gave up)

Revision history for this message
Marnix Pikkemaat (marnix-3) wrote :

P.S. this may be of interest: I expected my original layout and other settings to be loaded, but this didn't happen. It started with the default layout, and furthermore, it does not seem to store it's position between stopping and restarting

Revision history for this message
marmuta (marmuta) wrote :

Hi Marnix, good to have you for testing.

Uh oh, this is worrying, so many problems. Although I'm wondering what version of onboard you are running. I can't remember when gtk.glade was last used in onboard, must have been a long time ago. If I'm lucky you would just need to install onboard from the Precise repository. In fact, having an old version would explain all of those problems.

Did you build onboard from source or did you install one of Francesco's snapshots?

Revision history for this message
Marnix Pikkemaat (marnix-3) wrote :

Hi Marmuta,

what I did is:

bzr branch lp:onboard
cd onboard
sudo ./setup.py

I hope it's all my bad...

Revision history for this message
marmuta (marmuta) wrote :

sudo ./setup.py does nothing luckily, we don't have to clean up.

What distribution are you running?

- For Ubuntu 12.04 (Precise) just update onboard from the main repository. Onboard 0.97 has been accepted there.

- For Ubuntu 11.10 (Oneiric) there is still the snapshots ppa available at https://launchpad.net/~onboard/+archive/snapshots. Francesco, please correct me if I'm wrong.

- When Installing from source on any debian/ubuntu system better build and install the package:

bzr branch lp:onboard
cd onboard
dpkg-buildpackage -b -uc
sudo dpkg -i ../onboard_0.97.0-0ubuntu1_amd64.deb

You may need to adjust the last line on a 32bit system (ls ../*.deb).

- If nothing of this applies let me know

Revision history for this message
Marnix Pikkemaat (marnix-3) wrote :

Hi marmuta,

i've tried dpkg-build method and the ppa method on my oneiric install. Both resulting onboards did not relocate on rotate (moved to other workspace). Both resulting onboards seemed a bit less mature too, judging from the number of options in settings and the inavailability of styles.
I decided I must have been doing something very wrong, so I tried ubuntu 12.04. I can see that the installed version after reinstalling is 0.97. The result however is still the same, onboard. After some short testing, i found:

"Run takes no arguments(1 given)" when clicking settings in onboard itself, and

"could not find settings.glade" when running onoard-settings from command line. (this also happened when i ran onoard from ppa on oneiric, i manually copied the file, and that worked...)

I hope this is useful information to you, let me know if there are some things I can test.

Revision history for this message
marmuta (marmuta) wrote :

Hmm... settings.glade doesn't even exist on my system, onboards preferences ui is in settings.ui though.

What do
$ sudo updatedb
$ locate settings.glade
$ locate settings.ui
say?

Did you upgrade to 12.04 or reinstall?
What does
$ which onboard onboard-settings
 print? Both should start with /usr/bin.

Is there perhaps an old source installation of onboard in /usr/local?
/usr/local takes precedence over /usr, you would have to manually remove onboard from there:
$ sudo rm -rf /usr/local/share/onboard
$ sudo rm -rf /usr/local/share/pyshared/Onboard
$ sudo rm -rf /usr/local/lib/python2.7/dist-packages/Onboard
$ sudo rm /usr/local/share/glib-2.0/schemas/onboard.gschema.xml
$ sudo rm /usr/local/share/GConf/gsettings/onboard.convert
$ sudo rm /usr/local/share/locale/*/LC_MESSAGES/onboard.mo
$ sudo rm /usr/local/bin/onboard*

Revision history for this message
Marnix Pikkemaat (marnix-3) wrote :

Hi marmuta,

I must have had a double installation, for after fully reinstalling instead of upgrading, onboard is now back to what I expect, plus the "remember orientation" function works like a charm. Thanks for all the tips, but I started the reinstall yesterday, and I can no longer find out where things went wrong.
If there any specific aspects of the new version that you'd like to be tested, please let me know, I'd be happy to help.

Revision history for this message
marmuta (marmuta) wrote :

Great, good to hear you got it working. Rotation was one of the new features we didn't get feedback on yet. If you want to help, just keep an eye on it and let me know if and when onboard ends up at odd positions after rotation.

Other little tablet related features are the touch handles (long press on move button) and a way to disable frame resizing in Preferences -> Universal Access -> Resize Protection. Though, I've heard those worked for others already.

Changed in onboard:
status: Fix Committed → 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.