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
--- ./src/Fl_x.cxx.original 2009-03-09 12:01:20.000000000 -0300
+++ ./src/Fl_x.cxx 2009-03-09 12:01:26.000000000 -0300
@@ -1525,6 +1525,22 @@
(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 2009-03-09 12:01:20.000000000 -0300
+++ ./src/Fl_Window.cxx 2009-03-09 12:01:26.000000000 -0300
@@ -53,6 +53,7 @@
}
i = 0;
xclass_ = 0;
+ xtype_ = FL_NORMAL_WINDOW;
icon_ = 0;
iconlabel_ = 0;
resizable(0);
--- ./FL/Enumerations.H.original 2009-03-09 12:01:21.000000000 -0300
+++ ./FL/Enumerations.H 2009-03-09 12:01:26.000000000 -0300
@@ -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.
@{
--- ./FL/Fl_Window.H.original 2009-03-09 12:01:21.000000000 -0300
+++ ./FL/Fl_Window.H 2009-03-09 12:01:26.000000000 -0300
@@ -62,6 +62,7 @@
const char* iconlabel_;
const char* xclass_;
+ Fl_Windowtype xtype_;
const void* icon_;
// size_range stuff:
int minw, minh, maxw, maxh;
@@ -278,6 +279,20 @@
is not copied.
*/
void xclass(const char* 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 */
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev