Sets win_gravity correctly, this helps some X window managers that use
it position the window where fltk wants it to be. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@836 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
20522b715e
commit
b59a07f472
11
src/Fl_x.cxx
11
src/Fl_x.cxx
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_x.cxx,v 1.24.2.7 1999/11/04 18:35:12 bill Exp $"
|
||||
// "$Id: Fl_x.cxx,v 1.24.2.8 1999/11/10 09:18:31 bill Exp $"
|
||||
//
|
||||
// X specific code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -753,6 +753,7 @@ void Fl_X::sendxjunk() {
|
||||
hints.max_height = w->maxh;
|
||||
hints.width_inc = w->dw;
|
||||
hints.height_inc = w->dh;
|
||||
hints.win_gravity = StaticGravity;
|
||||
|
||||
// see the file /usr/include/X11/Xm/MwmUtil.h:
|
||||
// fill all fields to avoid bugs in kwm and perhaps other window managers:
|
||||
@ -761,10 +762,10 @@ void Fl_X::sendxjunk() {
|
||||
|
||||
if (hints.min_width != hints.max_width ||
|
||||
hints.min_height != hints.max_height) { // resizable
|
||||
hints.flags = PMinSize;
|
||||
hints.flags = PMinSize|PWinGravity;
|
||||
if (hints.max_width >= hints.min_width ||
|
||||
hints.max_height >= hints.min_height) {
|
||||
hints.flags = PMinSize|PMaxSize;
|
||||
hints.flags = PMinSize|PMaxSize|PWinGravity;
|
||||
// unfortunately we can't set just one maximum size. Guess a
|
||||
// value for the other one. Some window managers will make the
|
||||
// window fit on screen when maximized, others will put it off screen:
|
||||
@ -780,7 +781,7 @@ void Fl_X::sendxjunk() {
|
||||
hints.flags |= PAspect;
|
||||
}
|
||||
} else { // not resizable:
|
||||
hints.flags = PMinSize|PMaxSize;
|
||||
hints.flags = PMinSize|PMaxSize|PWinGravity;
|
||||
prop[0] = 1; // MWM_HINTS_FUNCTIONS
|
||||
prop[1] = 1|2|16; // MWM_FUNC_ALL | MWM_FUNC_RESIZE | MWM_FUNC_MAXIMIZE
|
||||
}
|
||||
@ -871,5 +872,5 @@ void Fl_Window::make_current() {
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_x.cxx,v 1.24.2.7 1999/11/04 18:35:12 bill Exp $".
|
||||
// End of "$Id: Fl_x.cxx,v 1.24.2.8 1999/11/10 09:18:31 bill Exp $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user