From 6ce27012a9412c4964e0ae40c81ea92ff39a61d3 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 18 Feb 2016 01:45:12 +0000 Subject: Fix Fl::grab(win) under Linux (program crashed in menus). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11187 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/X11/Fl_X11_Screen_Driver.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.cxx b/src/drivers/X11/Fl_X11_Screen_Driver.cxx index 4d4d08139..fad32ee43 100644 --- a/src/drivers/X11/Fl_X11_Screen_Driver.cxx +++ b/src/drivers/X11/Fl_X11_Screen_Driver.cxx @@ -454,7 +454,8 @@ void Fl_X11_Screen_Driver::grab(Fl_Window* win) GrabModeAsync, fl_event_time); } - Fl::grab(win); + Fl::grab_ = win; // FIXME: Fl::grab_ "should be private", but we need + // a way to *set* the variable from the driver! } else { if (Fl::grab()) { // We must keep the grab in the non-EWMH fullscreen case @@ -465,7 +466,8 @@ void Fl_X11_Screen_Driver::grab(Fl_Window* win) // this flush is done in case the picked menu item goes into // an infinite loop, so we don't leave the X server locked up: XFlush(fl_display); - Fl::grab(0); + Fl::grab_ = 0; // FIXME: Fl::grab_ "should be private", but we need + // a way to *set* the variable from the driver! fl_fix_focus(); } } -- cgit v1.2.3