DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: http://www.fltk.org/str.php?L2082
Version: 1.3-feature
Link: http://www.fltk.org/str.php?L2082
Version: 1.3-feature
--- ./FL/Fl_Window.H.original 2008-10-15 14:03:42.000000000 -0300
+++ ./FL/Fl_Window.H 2008-11-04 09:19:41.000000000 -0400
@@ -60,6 +60,7 @@
const char* iconlabel_;
const char* xclass_;
+ Fl_Windowtype xtype_;
const void* icon_;
// size_range stuff:
int minw, minh, maxw, maxh;
@@ -276,6 +277,20 @@
is not copied.
*/
void xclass(const char* c) {xclass_ = c;}
+
+ /** See void Fl_Window::xtype(Fl_Windowytype) */
+ Fl_Windowtype xtype() const {return xtype_;}
+ /**
+ The classification to tell the system what type of window this is.
Under X,
+ this is used by the window managers to apply consistent decoration,
+ stacking, etc. to all windows of the same type.
+ <P>By default, a Fl_Window is created as a <I>Normal</I> window. Use
this to indicate
+ that this Fl_Window is of another kind (e.g. a dialog window).
+
+ \todo Add appropriate utilisation of this by "other" OSes.
+ */
+ void xtype(Fl_Windowtype t) {xtype_ = t;}
+
/** Gets the current icon window target dependent data */
const void* icon() const {return icon_;}
/** Sets the current icon window target dependent data */
--- ./FL/Enumerations.H.original 2008-10-15 14:03:42.000000000 -0300
+++ ./FL/Enumerations.H 2008-11-04 09:01:58.000000000 -0400
@@ -572,6 +572,11 @@
FL_FREE_LABELTYPE ///< first free labeltype to use for creating
own labeltypes
};
+enum Fl_Windowtype { // window type
+ FL_NORMAL_WINDOW = 0, ///< A normal window (default)
+ FL_DIALOG_WINDOW ///< A dialog window
+};
+
/**
Sets the current label type end return its corresponding Fl_Labeltype
value.
@{
--- ./src/Fl_x.cxx.original 2008-10-27 09:50:03.000000000 -0300
+++ ./src/Fl_x.cxx 2008-11-04 09:43:12.000000000 -0400
@@ -1525,6 +1525,21 @@
(unsigned char *)buffer, p-buffer-1);
}
+ // set the window type to normal
+ Atom net_wm_type = XInternAtom(fl_display, "_NET_WM_WINDOW_TYPE",
False);
+ Atom net_wm_type_kind = 0;
+ switch(win->xtype()) {
+ case FL_DIALOG_WINDOW:
+ net_wm_type_kind = XInternAtom(fl_display,
"_NET_WM_WINDOW_TYPE_DIALOG", False);
+ break;
+
+ case FL_NORMAL_WINDOW:
+ default:
+ net_wm_type_kind = XInternAtom(fl_display,
"_NET_WM_WINDOW_TYPE_NORMAL", False);
+ }
+ XChangeProperty(fl_display, xp->xid, net_wm_type, XA_ATOM, 32,
PropModeReplace, (unsigned char*) &net_wm_type_kind, 1);
+
+
if (win->non_modal() && xp->next && !fl_disable_transient_for) {
// find some other window to be "transient for":
Fl_Window* wp = xp->next->w;
--- ./src/Fl_Window.cxx.original 2008-10-20 09:29:06.000000000 -0300
+++ ./src/Fl_Window.cxx 2008-11-04 09:06:24.000000000 -0400
@@ -51,6 +51,7 @@
}
i = 0;
xclass_ = 0;
+ xtype_ = FL_NORMAL_WINDOW;
icon_ = 0;
iconlabel_ = 0;
resizable(0);
_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev