macOS: Use sheet window as modal window
This commit is contained in:
parent
1866dbe608
commit
e33e4be257
8 changed files with 81 additions and 112 deletions
|
@ -806,6 +806,8 @@ void NativeWindowViews::SetMenu(ui::MenuModel* menu_model) {
|
|||
}
|
||||
|
||||
void NativeWindowViews::SetParentWindow(NativeWindow* parent) {
|
||||
NativeWindow::SetParentWindow(parent);
|
||||
|
||||
#if defined(USE_X11)
|
||||
XDisplay* xdisplay = gfx::GetXDisplay();
|
||||
XSetTransientForHint(
|
||||
|
@ -830,6 +832,7 @@ void NativeWindowViews::SetParentWindow(NativeWindow* parent) {
|
|||
}
|
||||
|
||||
void NativeWindowViews::SetModal(bool modal) {
|
||||
NativeWindow::SetModal(modal);
|
||||
#if defined(USE_X11)
|
||||
SetWindowType(GetAcceleratedWidget(), modal ? "dialog" : "normal");
|
||||
Show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue