diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2015-07-21 12:48:08 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2015-07-21 12:48:08 +0000 |
| commit | 6b491e331785b8a2c17ec17115dc478907f158d1 (patch) | |
| tree | abf883a2cd69811eb9bdef4d283dc5b1e144e1b6 /src | |
| parent | 1763da659631b5c5dbefaee8674703b91e546294 (diff) | |
Fix window resizing of common dialogs under certain rare conditions.
The modified test program test/ask.cxx showed a problem that the active
dialog window was resized when fl_message_icon() was called while it was
open, because this call makeform() which resized the window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10806 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/fl_ask.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx index 7a62a9b43..7e7a24edb 100644 --- a/src/fl_ask.cxx +++ b/src/fl_ask.cxx @@ -73,7 +73,6 @@ static void button_cb(Fl_Widget *, long val) { static Fl_Window *makeform() { if (message_form) { - message_form->size(410,103); return message_form; } // make sure that the dialog does not become the child of some @@ -134,6 +133,8 @@ static void resizeform() { int x, w, h, max_w, max_h; const int icon_size = 50; + message_form->size(410,103); + fl_font(message->labelfont(), message->labelsize()); message_w = message_h = 0; fl_measure(message->label(), message_w, message_h); @@ -209,6 +210,7 @@ static int innards(const char* fmt, va_list ap, avoidRecursion = 1; makeform(); + message_form->size(410,103); char buffer[1024]; if (!strcmp(fmt,"%s")) { message->label(va_arg(ap, const char*)); @@ -469,6 +471,7 @@ Fl_Widget *fl_message_icon() {makeform(); return icon;} static const char* input_innards(const char* fmt, va_list ap, const char* defstr, uchar type) { makeform(); + message_form->size(410,103); message->position(60,10); input->type(type); input->show(); |
