[STR Closed w/Resolution]
Link: http://www.fltk.org/str.php?L2648
Version: 1.3.0
Fix Version: 1.3.0 (r8756)
@Ingo: I attach the diff between r.8730 and r.8756 of Fl_x.cxx
that should allow you to test whether the bug is fixed in your hands
before the next RC.
Link: http://www.fltk.org/str.php?L2648
Version: 1.3.0
Fix Version: 1.3.0 (r8756)
Index: /Users/mgouy/Documents/fltk/COCOA/branch-1.3/src/Fl_x.cxx
===================================================================
--- /Users/mgouy/Documents/fltk/COCOA/branch-1.3/src/Fl_x.cxx (revision 8730)
+++ /Users/mgouy/Documents/fltk/COCOA/branch-1.3/src/Fl_x.cxx (revision 8756)
@@ -1977,6 +1977,9 @@
Window root, parent, *children;
unsigned n;
XQueryTree(fl_display, i->xid, &root, &parent, &children, &n); if (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 (root == parent) return h();
XWindowAttributes attributes;
XGetWindowAttributes(fl_display, parent, &attributes);
return attributes.height;
@@ -1988,6 +1991,9 @@
Window root, parent, *children;
unsigned n;
XQueryTree(fl_display, i->xid, &root, &parent, &children, &n); if (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 (root == parent) return w();
XWindowAttributes attributes;
XGetWindowAttributes(fl_display, parent, &attributes);
return attributes.width;
@@ -1998,17 +2004,26 @@
if (win->parent() || !win->border()) {
this->print_widget(win, x_offset, y_offset);
return;
}
Fl_Display_Device::display_device()->set_current();
win->show();
Fl::check();
win->make_current();
Window root, parent, *children, child_win, from;
- unsigned n;
- int bx, bt;
+ unsigned n = 0;
+ int bx, bt, do_it;
from = fl_window;
- XQueryTree(fl_display, fl_window, &root, &parent, &children, &n); if (n)
XFree(children);
- XTranslateCoordinates(fl_display, fl_window, parent, 0, 0, &bx, &bt,
&child_win);
+ do_it = (XQueryTree(fl_display, fl_window, &root, &parent, &children, &n) !=
0 &&
+ XTranslateCoordinates(fl_display, fl_window, parent, 0, 0, &bx, &bt,
&child_win) == True);
+ if (n) XFree(children);
+ // hack to bypass STR #2648: when compiz is used, root and parent are the
same window
+ // and I don't know where to find the window decoration
+ if (do_it && root == parent) do_it = 0;
+ if (!do_it) {
+ this->set_current();
+ this->print_widget(win, x_offset, y_offset);
+ return;
+ }
fl_window = parent;
uchar *top_image = 0, *left_image = 0, *right_image = 0, *bottom_image = 0;
top_image = fl_read_image(NULL, 0, 0, - (win->w() + 2 * bx), bt);
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs