summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-08-23 15:09:49 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-08-23 15:09:49 +0000
commit2dcf5a683a1b5a1e5a7862ba789ffaf43ea10f17 (patch)
treed05692cabb3352e7f7ba2ddc21caeb7f18dd95ed /src
parent5f1ab8a8b8c704fbd9e50954ce437f1c661118ae (diff)
More modal stuff (this time for sure! :)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2605 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index d009b7f3e..fa1f3aa4e 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl.cxx,v 1.24.2.41.2.51 2002/08/22 17:34:19 easysw Exp $"
+// "$Id: Fl.cxx,v 1.24.2.41.2.52 2002/08/23 15:09:49 easysw Exp $"
//
// Main event handling code for the Fast Light Tool Kit (FLTK).
//
@@ -614,11 +614,16 @@ int Fl::handle(int e, Fl_Window* window)
return ret;}
case FL_RELEASE: {
- if (pushed()) {
+// printf("FL_RELEASE: window=%p, pushed() = %p, grab() = %p, modal() = %p\n",
+// window, pushed(), grab(), modal());
+
+ if (grab()) {
+ wi = grab();
+ pushed_ = 0; // must be zero before callback is done!
+ } else if (pushed()) {
wi = pushed();
pushed_ = 0; // must be zero before callback is done!
- }
- if (grab()) wi = grab();
+ } else if (modal() && wi != modal()) return 0;
int r = send(e, wi, window);
fl_fix_focus();
return r;}
@@ -949,5 +954,5 @@ void Fl_Window::flush() {
}
//
-// End of "$Id: Fl.cxx,v 1.24.2.41.2.51 2002/08/22 17:34:19 easysw Exp $".
+// End of "$Id: Fl.cxx,v 1.24.2.41.2.52 2002/08/23 15:09:49 easysw Exp $".
//