MANICX100 / open-rp

Automatically exported from code.google.com/p/open-rp
0 stars 0 forks source link

Control key-combos don't always work #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Under Windows 7 64-bit, seems the control key-combos (CTRL-Q, CTRL-D,
CTRL-F), don't always work.

Original issue reported on code.google.com by dashhacker242 on 17 May 2009 at 5:06

GoogleCodeExporter commented 9 years ago
Windows Vista 32-bit as well.

Original comment by dashhacker242 on 17 May 2009 at 2:04

GoogleCodeExporter commented 9 years ago
proposed patch:

--- orp.cpp.orig        2009-05-17 18:09:47.617736754 +0200
+++ orp.cpp     2009-05-17 18:12:31.175735054 +0200
@@ -1327,16 +1327,14 @@
                case SDL_KEYDOWN:
                        switch (event.key.keysym.sym) {
                        case SDLK_q:
-                               if (event.key.keysym.mod == KMOD_LCTRL ||
-                                       event.key.keysym.mod == KMOD_RCTRL) {
+                               if (event.key.keysym.mod & ( KMOD_LCTRL | 
KMOD_RCTRL)) {
                                        mode.mode = CTRL_SESSION_TERM;
                                        ControlPerform(curl, &mode);
                                        return 0;
                                }
                                break;
                        case SDLK_d:
-                               if ((event.key.keysym.mod == KMOD_LCTRL ||
-                                       event.key.keysym.mod == KMOD_RCTRL) &&
+                               if ((event.key.keysym.mod & ( KMOD_LCTRL | 
KMOD_RCTRL )) &&
                                        view.size != VIEW_FULLSCREEN) {
                                        SDL_LockMutex(view.viewLock);
                                        if (view.size == VIEW_NORMAL)
@@ -1350,8 +1348,7 @@
                                }
                                break;
                        case SDLK_f:
-                               if (event.key.keysym.mod == KMOD_LCTRL ||
-                                       event.key.keysym.mod == KMOD_RCTRL) {
+                               if (event.key.keysym.mod & ( KMOD_LCTRL | 
KMOD_RCTRL )) {
                                        SDL_LockMutex(view.viewLock);
                                        if (view.size == VIEW_FULLSCREEN)
                                                view.size = view.prev;

Original comment by letha...@scarlet.be on 17 May 2009 at 4:36

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the patch!  Applied.

Much appreciated :)

Original comment by dashhacker242 on 17 May 2009 at 5:23

GoogleCodeExporter commented 9 years ago
Issue 7 has been merged into this issue.

Original comment by dashhacker242 on 17 May 2009 at 6:01