summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-03-23 13:13:00 +0000
committerManolo Gouy <Manolo>2016-03-23 13:13:00 +0000
commita114e3ab4d9fa408061003c04a95b293b3842f24 (patch)
treee2aed2f3ecaba5b38290700159cef16c01fab292 /src/Fl.cxx
parent270b437500552cba0d082363f9124456f16a1fda (diff)
Rewrite Fl_Window::handle(int) under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11403 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
-rw-r--r--src/Fl.cxx58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index 11d0c62ce..ffee65687 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1451,64 +1451,6 @@ int Fl::handle_(int e, Fl_Window* window)
}
-// FL_SHOW and FL_HIDE are called whenever the visibility of this widget
-// or any parent changes. We must correctly map/unmap the system's window.
-
-// For top-level windows it is assumed the window has already been
-// mapped or unmapped!!! This is because this should only happen when
-// Fl_Window::show() or Fl_Window::hide() is called, or in response to
-// iconize/deiconize events from the system.
-
-int Fl_Window::handle(int ev)
-{
- if (parent()) {
- switch (ev) {
- case FL_SHOW:
- if (!shown()) show();
- else {
-#if defined(USE_X11) || defined(WIN32)
- XMapWindow(fl_display, fl_xid(this)); // extra map calls are harmless
-#elif defined(__APPLE_QUARTZ__) // PORTME: Fl_Window_Driver - platform window mapping
- i->map();
-#elif defined(FL_PORTING)
-# pragma message "FL_PORTING: code to show a window on screen"
-#else
-# error unsupported platform
-#endif // __APPLE__ // PORTME: Fl_Window_Driver - platform window mapping
- }
- break;
- case FL_HIDE:
- if (shown()) {
- // Find what really turned invisible, if it was a parent window
- // we do nothing. We need to avoid unnecessary unmap calls
- // because they cause the display to blink when the parent is
- // remapped. However if this or any intermediate non-window
- // widget has really had hide() called directly on it, we must
- // unmap because when the parent window is remapped we don't
- // want to reappear.
- if (visible()) {
- Fl_Widget* p = parent(); for (;p->visible();p = p->parent()) {}
- if (p->type() >= FL_WINDOW) break; // don't do the unmap
- }
-#if defined(USE_X11) || defined(WIN32)
- XUnmapWindow(fl_display, fl_xid(this));
-#elif defined(__APPLE_QUARTZ__) // PORTME: Fl_Window_Driver - platform window unmapping, again
- i->unmap();
-#elif defined(FL_PORTING)
-# pragma message "FL_PORTING: code to hide a window from screen"
-#else
-# error platform unsupported
-#endif
- }
- break;
- }
-// } else if (ev == FL_FOCUS || ev == FL_UNFOCUS) {
-// Fl_Tooltip::exit(Fl_Tooltip::current());
- }
-
- return Fl_Group::handle(ev);
-}
-
////////////////////////////////////////////////////////////////
// Back compatibility cut & paste functions for fltk 1.1 only: