This patch implement support to tablet switch in solid. This switch inform
if a tablet laptop has it screen in normal state like a normal laptop or if
it is rotated like a tabletPC.

It's almost harmless and was tested in kdelibs 4.2.3. The later patch
implement more than is needed to add support to tablet switch so it can be
disconsidered.

regards,
Daniel Oliveira Nascimento
--- a/solid/solid/button.h	2009-05-13 11:03:19.000000000 -0300
+++ b/solid/solid/button.h	2009-05-13 11:25:16.000000000 -0300
@@ -55,9 +55,10 @@
          * - LidButton : The switch on a laptop that senses whether the lid is open or closed.
          * - PowerButton : The main power button on the computer.
          * - SleepButton : The sleep button on a computer capable of putting the computer into a suspend state.
+         * - TabletButton : The tablet switch on a laptop that senses if the monitor is rotated or not.
          * - UnknownButtonType : The type of the button is unknow.
          */
-         enum ButtonType{ LidButton, PowerButton, SleepButton, UnknownButtonType };
+         enum ButtonType{ LidButton, PowerButton, SleepButton, TabletButton, UnknownButtonType };
 
 
     private:
--- a/solid/solid/backends/hal/halbutton.cpp	2009-05-13 11:25:49.000000000 -0300
+++ b/solid/solid/backends/hal/halbutton.cpp	2009-05-13 11:39:42.000000000 -0300
@@ -49,6 +49,10 @@
     {
         return Solid::Button::SleepButton;
     }
+    else if (buttontype=="tablet_mode")
+    {
+        return Solid::Button::TabletButton;
+    }
     else
     {
         return Solid::Button::UnknownButtonType;
_______________________________________________
Kde-hardware-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-hardware-devel

Reply via email to