diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-11-27 05:15:47 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-11-27 05:15:47 +0000 |
| commit | f9f2de35726988a6fd9d3b226dc683c394c1d65c (patch) | |
| tree | 054094fa077dba15d389e69427c1866c670de245 /src | |
| parent | 0ca7b126e76c1fe88a55ffaff7b68fd941eb0530 (diff) | |
Fix a resize issue with X11.
Add missing Id keywords to input_choice.
Add sudoku to demo program.
Add on-line help to sudoku game, and put all of the cells in the main
window so that the keyboard navigation is sane.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4659 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_x.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index d930c2ec7..8e93afe50 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -944,6 +944,7 @@ int fl_handle(const XEvent& thisevent) // tell Fl_Window about it and set flag to prevent echoing: resize_bug_fix = window; +// printf("ConfigureNotify: X,Y,W,H=%d,%d,%d,%d\n", X, Y, W, H); window->resize(X, Y, W, H); break; // allow add_handler to do something too } @@ -972,6 +973,10 @@ int fl_handle(const XEvent& thisevent) //////////////////////////////////////////////////////////////// void Fl_Window::resize(int X,int Y,int W,int H) { +// printf("Fl_Window::resize(X=%d,Y=%d,W=%d,H=%d)\n", X, Y, W, H); +// printf(" resize_bug_fix=%p\n", resize_bug_fix); +// printf(" this=%p\n", this); + int is_a_move = (X != x() || Y != y()); int is_a_resize = (W != w() || H != h()); int resize_from_program = (this != resize_bug_fix); @@ -989,7 +994,7 @@ void Fl_Window::resize(int X,int Y,int W,int H) { size_range(w(), h(), w(), h()); } - if (resize_from_program && shown()) { + if (shown()) { if (is_a_resize) { if (!resizable()) size_range(w(),h(),w(),h()); if (is_a_move) { @@ -997,8 +1002,9 @@ void Fl_Window::resize(int X,int Y,int W,int H) { } else { XResizeWindow(fl_display, i->xid, W>0 ? W : 1, H>0 ? H : 1); } - } else + } else if (resize_from_program) { XMoveWindow(fl_display, i->xid, X, Y); + } } } |
