summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorracarr <racarr>2007-01-28 16:13:36 +0000
committerracarr <racarr>2007-01-28 16:13:36 +0000
commit5ac8b364866ab0ccd144fcaf77fa1c5bf43ef3e9 (patch)
tree196c752e0bdc1c8740e6b17fba0edf9d4f96ccfe
parent9f9eb66b174fd66a87ff89f449107be438a3296f (diff)
downloadberyl-desktop-manager-5ac8b364866ab0ccd144fcaf77fa1c5bf43ef3e9.tar.gz
beryl-desktop-manager-5ac8b364866ab0ccd144fcaf77fa1c5bf43ef3e9.tar.bz2
Get key press and mouse press and proximity in and all sorts of wonderful events
-rw-r--r--src/bdm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bdm.c b/src/bdm.c
index 47f6884..6498716 100644
--- a/src/bdm.c
+++ b/src/bdm.c
@@ -68,9 +68,10 @@ static void on_alpha_screen_changed(GtkWidget * widget, GdkScreen * pOldScreen,
gtk_widget_set_colormap(widget,pColormap);
}
-gboolean on_key_press(GtkWidget * pWidget, GdkEventKey *pKey, gpointer userData)
+gboolean on_key_press(GtkWidget * pWidget, GdkEventKey *pKey, ScreenArea * userData)
{
- printf("Bla");
+ //userData->alpha = 0.5;
+ //render(userData);
}
int main(int argc, char * argv[])
@@ -208,7 +209,9 @@ int main(int argc, char * argv[])
gtk_widget_set_app_paintable(dwindow, TRUE);
gtk_window_set_keep_below(GTK_WINDOW(dwindow),TRUE);
g_signal_connect( G_OBJECT(dwindow),"expose-event",G_CALLBACK(on_alpha_window_expose),sa);
-
+
+ g_signal_connect(G_OBJECT(dwindow),"key-press-event",G_CALLBACK(on_key_press),sa);
+ gtk_widget_add_events(G_OBJECT(dwindow), GDK_ALL_EVENTS_MASK);
gtk_widget_show(dwindow);
on_alpha_window_expose(dwindow,0,sa);
}