Remove redundant if condition, fix indenting.

Note: if (i && i->x); should have been: if (i && i->xid); [1]
  but this is redundant because we always have an xid when an Fl_X exists,
  at least in X11 (see Fl_X::set_xid(..) in src/Fl_x.cxx).
  This might change in the future.

[1] Clang warning: address of function 'i->x' will always evaluate to 'true'.
    A similar warning was issued when using gcc 4.9.3 under Cygwin/X11.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11598 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser 2016-04-13 13:21:27 +00:00
parent 737ae06381
commit a1ffa85a1e

View File

@ -188,9 +188,9 @@ void Fl_X11_Window_Driver::take_focus()
{
Fl_X *i = Fl_X::i(pWindow);
if (!Fl_X::ewmh_supported())
pWindow->show(); // Old WMs, XMapRaised
else if (i && i->x) // New WMs use the NETWM attribute:
Fl_X::activate_window(i->xid);
pWindow->show(); // Old WMs, XMapRaised
else if (i) // New WMs use the NETWM attribute:
Fl_X::activate_window(i->xid);
}