diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-05-25 18:43:08 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-05-25 18:43:08 +0200 |
| commit | 2cbc743c6ad32c09c4dca68ab36a0f24307df0bf (patch) | |
| tree | d0279a194c3d312f9feb776df75ea7847caf1155 /src/drivers/X11 | |
| parent | a471c67f67cbc6a0b41d578ec9ea2e0323626f70 (diff) | |
Slightly simplify Fl_X11_Window_Driver::capture_titlebar_and_borders()
Diffstat (limited to 'src/drivers/X11')
| -rw-r--r-- | src/drivers/X11/Fl_X11_Window_Driver.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/drivers/X11/Fl_X11_Window_Driver.cxx b/src/drivers/X11/Fl_X11_Window_Driver.cxx index ec3978ae8..34313ce26 100644 --- a/src/drivers/X11/Fl_X11_Window_Driver.cxx +++ b/src/drivers/X11/Fl_X11_Window_Driver.cxx @@ -399,15 +399,12 @@ void Fl_X11_Window_Driver::capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_R if (pWindow->decorated_h() == h()) return; Window from = fl_window; Fl_Surface_Device::push_current( Fl_Display_Device::display_device() ); - pWindow->show(); - Fl::check(); - pWindow->make_current(); - Window root, parent, *children, child_win; + Window root, parent, *children, child_win, xid = fl_xid(pWindow); unsigned n = 0; int do_it; int wsides, htop; - do_it = (XQueryTree(fl_display, fl_window, &root, &parent, &children, &n) != 0 && - XTranslateCoordinates(fl_display, fl_window, parent, 0, 0, &wsides, &htop, &child_win) == True); + do_it = (XQueryTree(fl_display, xid, &root, &parent, &children, &n) != 0 && + XTranslateCoordinates(fl_display, xid, parent, 0, 0, &wsides, &htop, &child_win) == True); if (n) XFree(children); if (!do_it) wsides = htop = 0; int hbottom = wsides; |
