From: Creamy Goodness Date: Tue, 21 Dec 2010 05:32:45 +0000 (-0700) Subject: allows task-switch aka exit_app_view when clicking in top left area from fullscreen... X-Git-Url: http://vcs.maemo.org/git/?p=monky;a=commitdiff_plain;h=dbd327f47012869e1c286ee0e3d80446e8c3d9a2 allows task-switch aka exit_app_view when clicking in top left area from fullscreen mode --- diff --git a/src/conky.c b/src/conky.c index cc92a0b..c766820 100644 --- a/src/conky.c +++ b/src/conky.c @@ -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 */ diff --git a/src/linux.c b/src/linux.c index 8703c99..c2755c7 100644 --- a/src/linux.c +++ b/src/linux.c @@ -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];