Search
lxdream.org :: lxdream/src/gtkui/gtk_ctrl.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gtkui/gtk_ctrl.c
changeset 849:bbe26d798fc2
prev770:429ff505c450
next852:2b4a5e3575b9
author nkeynes
date Mon Sep 08 05:13:51 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Refactor mouse event management - button events are now usable for controllers
file annotate diff log raw
1.1 --- a/src/gtkui/gtk_ctrl.c Mon Jul 28 03:41:25 2008 +0000
1.2 +++ b/src/gtkui/gtk_ctrl.c Mon Sep 08 05:13:51 2008 +0000
1.3 @@ -60,7 +60,14 @@
1.4 static gboolean config_key_buttonpress( GtkWidget *widget, GdkEventButton *event, gpointer user_data )
1.5 {
1.6 gboolean keypress_mode = GPOINTER_TO_INT(g_object_get_data( G_OBJECT(widget), "keypress_mode"));
1.7 - if( !keypress_mode ) {
1.8 + if( keypress_mode ) {
1.9 + gchar *keysym = input_keycode_to_keysym( &system_mouse_driver, event->button);
1.10 + if( keysym != NULL ) {
1.11 + config_keysym_hook( widget, keysym );
1.12 + g_free(keysym);
1.13 + }
1.14 + return TRUE;
1.15 + } else {
1.16 gtk_entry_set_text( GTK_ENTRY(widget), _("<press key>") );
1.17 g_object_set_data( G_OBJECT(widget), "keypress_mode", GINT_TO_POINTER(TRUE) );
1.18 input_set_keysym_hook(config_keysym_hook, widget);
.