From e6631a0f7fdc8d3383927bac49f521791cddcc9c Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 12 Mar 2016 22:24:20 +0000 Subject: Moved the Fl_Window::decorated_*() functions teh Window_Driver git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_x.cxx | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'src/Fl_x.cxx') diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index b0469c36b..4dcb1ab03 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -2951,38 +2951,6 @@ FL_EXPORT Window fl_xid_(const Fl_Window *w) { return temp ? temp->xid : 0; } -static void decorated_win_size(Fl_Window *win, int &w, int &h) -{ - w = win->w(); - h = win->h(); - if (!win->shown() || win->parent() || !win->border() || !win->visible()) return; - Window root, parent, *children; - unsigned n = 0; - Status status = XQueryTree(fl_display, Fl_X::i(win)->xid, &root, &parent, &children, &n); - if (status != 0 && n) XFree(children); - // when compiz is used, root and parent are the same window - // and I don't know where to find the window decoration - if (status == 0 || root == parent) return; - XWindowAttributes attributes; - XGetWindowAttributes(fl_display, parent, &attributes); - w = attributes.width; - h = attributes.height; -} - -int Fl_Window::decorated_h() -{ - int w, h; - decorated_win_size(this, w, h); - return h; -} - -int Fl_Window::decorated_w() -{ - int w, h; - decorated_win_size(this, w, h); - return w; -} - #ifdef USE_PRINT_BUTTON // to test the Fl_Printer class creating a "Print front window" button in a separate window // contains also preparePrintFront call above -- cgit v1.2.3