linux: Make modal dialog show more smoothly

This commit is contained in:
Cheng Zhao 2016-06-19 17:49:31 +09:00
parent 9aa7291627
commit 02acce8991

View file

@ -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
}