libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcvd-members] libcvd/cvd_src glwindow.cc


From: Edward Rosten
Subject: [libcvd-members] libcvd/cvd_src glwindow.cc
Date: Fri, 08 Jun 2007 22:34:28 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Edward Rosten <edrosten>        07/06/08 22:34:28

Modified files:
        cvd_src        : glwindow.cc 

Log message:
        XLookupKeySym doesn't deal with modifiers, but XLookupString does.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/glwindow.cc?cvsroot=libcvd&r1=1.5&r2=1.6

Patches:
Index: glwindow.cc
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/glwindow.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- glwindow.cc 8 Jun 2007 00:26:08 -0000       1.5
+++ glwindow.cc 8 Jun 2007 22:34:28 -0000       1.6
@@ -191,6 +191,7 @@
 void CVD::GLWindow::handle_events(EventHandler& handler)
 {
     XEvent event;
+       KeySym k;
     while (XPending(state->display)) {
        XNextEvent(state->display, &event);
        switch (event.type) {
@@ -206,10 +207,14 @@
            handler.on_mouse_move(*this, ImageRef(event.xmotion.x, 
event.xmotion.y), convertButtonState(event.xbutton.state));
            break;
        case KeyPress:
-           handler.on_key_down(*this, XLookupKeysym(&event.xkey, 0));
+               {       
+               XLookupString(&event.xkey, 0, 0, &k, 0);
+           handler.on_key_down(*this, k);
            break;
+               }
        case KeyRelease:
-           handler.on_key_up(*this, XLookupKeysym(&event.xkey, 0));
+               XLookupString(&event.xkey, 0, 0, &k, 0);
+           handler.on_key_up(*this, k);
            break;
            //case UnmapNotify: active = 0; break;
            //case MapNotify: active = 1; break;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]