fixed mouse events in fb version too
authorEleni Maria Stea <elene.mst@gmail.com>
Mon, 25 Feb 2013 00:01:33 +0000 (02:01 +0200)
committerEleni Maria Stea <elene.mst@gmail.com>
Mon, 25 Feb 2013 00:01:33 +0000 (02:01 +0200)
-------------- Ths line and the following will be ignored --------------

modified:
  Makefile
  src/fbdev/mouse.cc
unknown:
  tags
  winnie
  winnie_fix_abs_mouse.patch
  src/pixmap.d
  src/wm.cc.rej
  src/fbdev/event.d
  src/fbdev/gfx.d
  src/fbdev/keyboard.d
  src/fbdev/mouse.d
  src/sdl/event.d
  src/sdl/gfx.d
  src/sdl/keyboard.d
  src/sdl/mouse.d

Makefile
src/fbdev/mouse.cc

index a894e52..ad3fd6c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ dbg = -g
 opt = -O0
 inc = -Isrc
 
-backend = SDL
+#backend = SDL
 
 ifeq ($(backend), SDL)
        def = -DWINNIE_SDL
index 62271ab..61c5406 100644 (file)
@@ -71,12 +71,15 @@ void process_mouse_event()
                return;
        }
 
-       Window *top = wm->get_window_at_pos(pointer_x, pointer_y);
-       if(top) {
-               wm->set_focused_window(top);
-       }
-       else {
-               wm->set_focused_window(0);
+       Window *top;
+       if(!(top = wm->get_grab_window())) {
+               top = wm->get_window_at_pos(pointer_x, pointer_y);
+               if(top) {
+                       wm->set_focused_window(top);
+               }
+               else {
+                       wm->set_focused_window(0);
+               }
        }
 
         /* - send each pointer move and button press/release to the topmost window