mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
linux: Make modal dialog show more smoothly
This commit is contained in:
@@ -837,9 +837,10 @@ void NativeWindowViews::SetParentWindow(NativeWindow* parent) {
|
||||
|
||||
void NativeWindowViews::SetModal(bool modal) {
|
||||
#if defined(USE_X11)
|
||||
SetWindowType(GetAcceleratedWidget(), modal ? "dialog" : "normal");
|
||||
Show();
|
||||
SetWMSpecState(GetAcceleratedWidget(), modal,
|
||||
GetAtom("_NET_WM_STATE_MODAL"));
|
||||
SetWindowType(GetAcceleratedWidget(), modal ? "dialog" : "normal");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user