Add Tablet PC support to krandrtray and lockprocess (patches included)

Bug #90455 reported by Andrew Lofthouse
8
Affects Status Importance Assigned to Milestone
kdebase (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Gutsy by Andrew Lofthouse

Bug Description

Binary package hint: kdebase

OpenSUSE has several features added to KDE that support Tablet PCs. Two of these features are the following:

1) Add support to krandrtray that rotates wacom pointers when the display is rotated. Otherwise, separate use of the xsetwacom command is required (which isn't possible to do with just a stylus).

2) Add support to lockprocess so that a virtual keyboard (xvkbd) is shown when trying to unlock the desktop. This allows the use of a stylus to input the password when the display is locked.

Both features can be enabled in kdebase with two patches that I will attach below. These patches were downloaded from https://beta.suse.com/private/dkukawka. The second patch (to show xvkbd) also requires a patch to hal that is requested in Bug #90451. I've verified that both patches apply and build cleanly with kdebase_3.5.6-0ubuntu13.

Revision history for this message
Andrew Lofthouse (loftyhauser) wrote :

Here is the patch to allow rotation of the wacom pointers with krandrtray.

Revision history for this message
Andrew Lofthouse (loftyhauser) wrote :

Here is the patch to pop up a virtual keyboard (xvkbd) when the unlock display dialog is shown.

Revision history for this message
Andrew Lofthouse (loftyhauser) wrote :

I just realized that the kdm files also belong to kdebase. Another feature that would be desireable is to display a virtual keyboard with kdm so a user can log in with the stylus. This would require the hal patch mentioned above in Bug #90451. It requires modifying /etc/kde3/kdm/Xsetup and /etc/kde3/kdm/Xstartup. The patch file is attached.

Revision history for this message
Andrew Lofthouse (loftyhauser) wrote :

Actually, this patch is better than the one above.

Revision history for this message
Anthony Mercatante (tonio) wrote :

I can't test those pathes at the moment, but I'll have a look next week eventually for inclusion.
Let's hope that doesn't break the feature freeze...

Revision history for this message
arrenlex (arrenlex+ubu) wrote :

Thanks, man! You saved me from having to run SuSE! :D Patches worked great.

I run debian (etch), not ubuntu, so I don't know how relevant this is, but I had to modify one to make it apply to kdebase 3.5.5a.dfsg.1-6. Attached are the changes I had to make to make kdebase eat lock-show-xvkbd. If these changes aren't needed for ubuntu, great; sorry for wasting your time.

Thanks again!

Revision history for this message
Marco Maini (maini10) wrote :

Thanks for your report. Your idea might get more attention and have the possibility of being implemented if you submit a specification for it. You can start writing a spec yourself. https://wiki.ubuntu.com/FeatureSpecifications for the development release. Please include your patches. Thanks again for the time to improve Kubuntu.

Changed in kdebase:
status: New → Invalid
Revision history for this message
Dread Knight (dread.knight) wrote :

Can you guys patch kde4 as well? Otherwise i'm really considering openSuse for my tablet Pc :\
I am running hardy atm with kde 4.1.1 i think

Revision history for this message
Karl Hegbloom (karl.hegbloom) wrote :

I don't think that changing the wacom orientation belongs there, since it's too localized to that point of control. Here's what I mean by that:

The tablet rotation needs to change any time the display rotation does, so they stay in sync. In general, with a usb tablet on a desktop workstation, if you have a monitor that swivels to portrait rotation, and use RandR to change it, you might NOT want your wacom rotation to follow it. But on a tablet PC, you always want them to remain in sync. Perhaps the X wacom driver should be made aware of RandR events, and have a setting that tells it to rotate with the screen, automatically. Unset that, and it will not rotate when the screen does.

Since the wacom driver does not presently support RandR, and since there are other things that need to be done when the screen is rotated, the best solution involves arranging for an event handler or hook script to be run when the rotation has occured. It ought to work no matter what program you use to send the RandR commands to the display, and no matter whether you invoke it manually with a command or button, or it's done automatically by an ACPI swivel-down-tablet or swivel-up-laptop event (sort of a button in it's own right).

I've been researching this problem online, and have found a simple daemon that connects to the user's X server, registers to receive RandR Rotation event notifications, and then sleeps until one occurs. When it wakes up, it looks to see what the new screen rotation is, by directly querying the display itself. If it's the same as last time it woke up, it goes back to sleep. Otherwise, it calls a shell script with a single argument for the new rotation, then goes back to sleep.

The shell script is responsible for changing the navpad orientation, the Wacom tablet rotation, etc. Since it's invoked through an actual display rotation event, it runs no matter what program actually called for the rotation. (See bug #217182 for a comment describing this further.)

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.