STR#2051 fix: Tile would still change the mouse cursor when inactive.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6378 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Fabien Costantini 2008-10-05 17:21:08 +00:00
parent 8d5f884b4a
commit cf001ac338
2 changed files with 9 additions and 1 deletions

View File

@ -136,7 +136,10 @@ int Fl_Tile::handle(int event) {
case FL_MOVE:
case FL_ENTER:
case FL_PUSH: {
case FL_PUSH:
// don't potentially change the mouse cursor if inactive:
if (!active()) break; // will cascade inherited handle()
{
int mindx = 100;
int mindy = 100;
int oldx = 0;

View File

@ -30,6 +30,8 @@
#include <FL/Fl_Tile.H>
#include <FL/Fl_Box.H>
//#define TEST_INACTIVE
int main(int argc, char** argv) {
Fl_Window window(300,300);
window.box(FL_NO_BOX);
@ -82,6 +84,9 @@ int main(int argc, char** argv) {
tile.end();
window.end();
#ifdef TEST_INACTIVE // test inactive case
tile.deactivate();
#endif
w1.show();
window.show(argc,argv);
return Fl::run();