Made an executive decision about the behavior of uiControlShow() on uiWindows.

This commit is contained in:
Pietro Gagliardi 2015-05-04 17:23:01 -04:00
parent 68a1cfb199
commit e571a73247
3 changed files with 6 additions and 4 deletions

View File

@ -59,3 +59,5 @@ ultimately:
notes to self
- explicitly document label position at top-left corner
- mark that uiControlShow() on a uiWindow() will bring to front and give keyboard focus because of OS X
- make sure ShowWindow() is sufficient for zorder on Windows

View File

@ -103,9 +103,7 @@ static void windowShow(uiControl *c)
{
struct window *w = (struct window *) c;
// don't make it key (TODO really? first time only?)
// unfortunately there's no orderIn: or something that says "make the window visible but preserve the z-order" so
[w->window orderFront:w->window];
[w->window makeKeyAndOrderFront:w->window];
w->hidden = 0;
}

View File

@ -91,7 +91,9 @@ static void windowShow(uiControl *c)
struct window *w = (struct window *) c;
// don't use gtk_widget_show_all() as that will show all children, regardless of user settings
gtk_widget_show(w->widget);
// don't use gtk_widget_show(); that doesn't bring to front or give keyboard focus
// (gtk_window_present() does call gtk_widget_show() though)
gtk_window_present(w->window);
w->hidden = 0;
}