Merge pull request #350 from and3md/mouse_move_always_redraw_fix

Fix mouse move always redraw - related to #347
This commit is contained in:
Vadim Lopatin 2017-05-22 10:29:03 +03:00 committed by GitHub
commit 3c9e21e9f8
2 changed files with 4 additions and 3 deletions

View File

@ -722,7 +722,7 @@ class SDLWindow : Window {
bool res = dispatchMouseEvent(event);
if (res) {
debug(mouse) Log.d("Calling update() after mouse event");
invalidate();
update();
}
}
}
@ -951,7 +951,7 @@ class SDLWindow : Window {
bool res = dispatchKeyEvent(new KeyEvent(KeyAction.Text, 0, flags, ds));
if (res) {
debug(DebugSDL) Log.d("Calling update() after text event");
invalidate();
update();
}
return res;
}
@ -1026,7 +1026,7 @@ class SDLWindow : Window {
// }
if (res) {
debug(DebugSDL) Log.d("Calling update() after key event");
invalidate();
update();
}
return res;
}

View File

@ -211,6 +211,7 @@ class SwitchButton : Widget {
uint st = state;
img.drawTo(buf, rc, st);
}
_needDraw = false;
}
}