STR #1584: even smarter mouse pointer hiding. I also fixed two little historic bugs in "ask" (double adding a widget, and not using "label.obj()" instead of "copy_label()" for non-static buffer. Lastly, I changed "boxtype" to use a Double_Window because it has become so big now that it started flickering.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5671 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2007-02-08 07:58:47 +00:00
parent 44fab0180e
commit 624e885b24
4 changed files with 8 additions and 7 deletions

View File

@ -350,8 +350,8 @@ int Fl_Input::handle(int event) {
position(position());
return (1);
} else {
if (active_r() && window()) window()->cursor(FL_CURSOR_NONE);
if (active_r() && window() && this == Fl::belowmouse())
window()->cursor(FL_CURSOR_NONE);
return handle_key();
}

View File

@ -447,7 +447,8 @@ int Fl_Text_Editor::handle(int event) {
return 1;
case FL_KEYBOARD:
if (active_r() && window()) window()->cursor(FL_CURSOR_NONE);
if (active_r() && window() && this == Fl::belowmouse())
window()->cursor(FL_CURSOR_NONE);
return handle_key();
case FL_PASTE:

View File

@ -47,7 +47,7 @@ void rename_me(Fl_Widget*o) {
const char *input = fl_input("Input:", o->label());
if (input) {
o->label(input);
o->copy_label(input);
o->redraw();
}
}
@ -65,7 +65,7 @@ int main(int argc, char **argv) {
Fl_Window window(200, 55);
Fl_Return_Button b(20, 10, 160, 35, buffer); b.callback(rename_me);
window.add(b);
window.end();
window.resizable(&b);
window.show(argc, argv);

View File

@ -28,7 +28,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <FL/Fl.H>
#include <FL/Fl_Single_Window.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Box.H>
int N = 0;
@ -50,7 +50,7 @@ void bt(const char *name, Fl_Boxtype type, int square=0) {
}
int main(int argc, char ** argv) {
window = new Fl_Single_Window(4*W,ROWS*H);
window = new Fl_Double_Window(4*W,ROWS*H);
window->box(FL_FLAT_BOX);
#if 0 // this code uses the command line arguments to set arbitrary color schemes
Fl::args(argc, argv);