rnd-20001125-1-src
[rocksndiamonds.git] / src / events.c
index 7da6e5536c058fb79e9598f4a8a95e10de3cee7c..9f84cc207126b5ce4d7f2d52053061fc9faa623c 100644 (file)
@@ -33,7 +33,7 @@
    delay problems with lots of mouse motion events when mouse
    button not pressed */
 
-int EventFilter(const Event *event)
+int FilterMouseMotionEvents(const Event *event)
 {
   if (event->type != EVENT_MOTIONNOTIFY)
     return 1;
@@ -55,7 +55,7 @@ void EventLoop(void)
 
       NextEvent(&event);
 
-      if (EventFilter(&event))
+      if (FilterMouseMotionEvents(&event))
       {
        switch(event.type)
        {
@@ -426,6 +426,7 @@ void HandleButton(int mx, int my, int button)
 void HandleKey(Key key, int key_status)
 {
   int joy = 0;
+  boolean anyTextGadgetActiveOrJustFinished = anyTextGadgetActive();
   static struct SetupKeyboardInfo custom_key;
   static struct
   {
@@ -589,7 +590,8 @@ void HandleKey(Key key, int key_status)
       break;
 
     case LEVELED:
-      HandleLevelEditorKeyInput(key);
+      if (!anyTextGadgetActiveOrJustFinished)
+       HandleLevelEditorKeyInput(key);
       break;
 
     case PLAYING: