From 2fd4dde9f5d682898b7fc387bb364fff2febf8fb Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sun, 27 Mar 2016 07:47:52 +0000 Subject: Rewrite Fl_Menu_Window class under the driver model. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11441 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Menu_Window.cxx | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) (limited to 'src/Fl_Menu_Window.cxx') diff --git a/src/Fl_Menu_Window.cxx b/src/Fl_Menu_Window.cxx index 44098817b..fd0ec6ed0 100644 --- a/src/Fl_Menu_Window.cxx +++ b/src/Fl_Menu_Window.cxx @@ -23,52 +23,21 @@ // which are used so that clicks outside the program's windows // can be used to dismiss the menus. -#include -#include -#include #include #include -// WIN32 note: HAVE_OVERLAY is false -#if HAVE_OVERLAY -#include -extern XVisualInfo *fl_overlay_visual; -extern uchar fl_overlay; // changes how fl_color(x) works -#endif - -#include - void Fl_Menu_Window::show() { driver()->show_menu(); } void Fl_Menu_Window::flush() { if (!shown()) return; -#if HAVE_OVERLAY - if (!fl_overlay_visual || !overlay()) {Fl_Single_Window::flush(); return;} - Fl_X *myi = Fl_X::i(this); - fl_window = myi->xid; -# if defined(FLTK_USE_CAIRO) - // capture gc changes automatically to update the cairo context adequately - if(Fl::autolink_context()) Fl::cairo_make_current(fl_graphics_driver->gc()); -# endif - fl_overlay = 1; - fl_clip_region(myi->region); myi->region = 0; current_ = this; - draw(); - fl_overlay = 0; -#else - Fl_Single_Window::flush(); -#endif + driver()->flush_menu(); } -/** Erases the window, does nothing if HAVE_OVERLAY is not defined config.h */ +/** Erases the window, does nothing if HAVE_OVERLAY is not defined in config.h */ void Fl_Menu_Window::erase() { -#if HAVE_OVERLAY - if (!shown()) return; -//XSetForeground(fl_display, gc, 0); -//XFillRectangle(fl_display, fl_xid(this), gc, 0, 0, w(), h()); - XClearWindow(fl_display, fl_xid(this)); -#endif + driver()->erase_menu(); } // Fix the colormap flashing on Maximum Impact Graphics by erasing the -- cgit v1.2.3