Apple Cocoa: modal windows would not resize.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7479 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2010-04-11 09:52:05 +00:00
parent 2fe7eabb62
commit 896c6c2766
2 changed files with 6 additions and 4 deletions

View File

@ -1188,7 +1188,6 @@ void align_position_cb(Fl_Choice *i, void *v) {
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
Fl_Align x = q->o->align();
Fl_Align y = (x & ~FL_ALIGN_POSITION_MASK) | b;
//printf("x:%04x y:%04x b:%04x\n", x, y, b);
if (x != y) {
q->o->align(y);
q->redraw();
@ -1787,6 +1786,7 @@ void live_mode_cb(Fl_Button*o,void *) {
}
if (o->value()) {
if (numselected == 1) {
Fl_Group::current(0L);
live_widget = current_widget->enter_live_mode(1);
if (live_widget) {
live_type = current_widget;
@ -1804,8 +1804,9 @@ void live_mode_cb(Fl_Button*o,void *) {
Fl_Button *btn = new Fl_Button(10, h+20, 100, 25, "Exit Live Mode");
btn->labelsize(12);
btn->callback(leave_live_mode_cb);
live_widget->position(10, 10);
rsz->end();
live_window->add(live_widget);
live_widget->position(10, 10);
live_window->resizable(live_widget);
live_window->set_modal(); // block all other UI
live_window->callback(leave_live_mode_cb);

View File

@ -2100,7 +2100,7 @@ void Fl_X::make(Fl_Window* w)
winstyle |= NSResizableWindowMask;
}
} else {
if (w->resizable()) {
if (w->resizable()) {
Fl_Widget *o = w->resizable();
int minw = o->w(); if (minw > 100) minw = 100;
int minh = o->h(); if (minh > 100) minh = 100;
@ -2121,7 +2121,8 @@ void Fl_X::make(Fl_Window* w)
winstyle = NSBorderlessWindowMask;
}
} else if (w->modal()) {
winstyle &= ~(NSResizableWindowMask | NSMiniaturizableWindowMask);
winstyle &= ~NSMiniaturizableWindowMask;
// winstyle &= ~(NSResizableWindowMask | NSMiniaturizableWindowMask);
// winlevel = NSModalPanelWindowLevel;
}
else if (w->non_modal()) {