allows task-switch aka exit_app_view when clicking in top left area from fullscreen...
authorCreamy Goodness <lance.colton@gmail.com>
Tue, 21 Dec 2010 05:32:45 +0000 (22:32 -0700)
committerCreamy Goodness <lance.colton@gmail.com>
Tue, 21 Dec 2010 05:32:45 +0000 (22:32 -0700)
src/conky.c
src/linux.c

index cc92a0b..c766820 100644 (file)
@@ -3798,6 +3798,10 @@ static void main_loop(void)
                                                                {
                                                                        terminate = 1;
                                                                }
+                                                               if (ev.xbutton.x <= 50 && ev.xbutton.y <= 50)
+                                                               {       //minimize / goto task switcher
+                                                                       dbus_exit_app_view();
+                                                               }
                                                                break;
                                                        } else {
                                                                /* forward the click to the desktop window */
index 8703c99..c2755c7 100644 (file)
@@ -1651,6 +1651,27 @@ DBusBusType type;
 int message_type;
 DBusMessage *reply;
 
+void dbus_exit_app_view()
+{
+       //dbus-send --type=signal --session     /com/nokia/hildon_desktop .
+
+       type = DBUS_BUS_SESSION;
+       //message_type = DBUS_MESSAGE_TYPE_SIGNAL;
+       dbus_error_init (&error);
+       connection = dbus_bus_get (type, &error);
+    message = dbus_message_new_signal ("/com/nokia/hildon_desktop", "com.nokia.hildon_desktop", "exit_app_view");
+    // send the message and flush the connection
+    if (!dbus_connection_send(connection, message, NULL)) {
+       fprintf(stderr, "Out Of Memory!\n");
+       exit(1);
+    }
+    dbus_connection_flush(connection);
+
+    // free the message
+    dbus_message_unref(message);
+
+}
+
 void get_dbus_stuff(char *buffer,unsigned int intMax_length, int item)
 {
        char method[128];