From d3a8566cab75203a3023b55683c9f45940779110 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Fri, 5 Sep 2014 16:42:00 +0000 Subject: Move the ewmh_supported check into fl_fix_focus to avoid a double show() on new WMs git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10279 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Fl.cxx b/src/Fl.cxx index bcf820410..5386fc105 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -926,9 +926,10 @@ void Fl::focus(Fl_Widget *o) { #elif defined(USE_X11) if (fl_xfocus != win) { Fl_X *x = Fl_X::i(win); - win->show(); // Old WMs, XMapRaised - // New WMs use the NETWM attribute: - if (x) Fl_X::activate_window(x->xid); + if (!Fl_X::ewmh_supported()) + win->show(); // Old WMs, XMapRaised + else if (x) // New WMs use the NETWM attribute: + Fl_X::activate_window(x->xid); } #endif fl_xfocus = win; -- cgit v1.2.3