Lines 654-659
void xf_SetWindowStyle(xfContext* xfc, xfAppWindow* appWindow, UINT32 style, UIN
Link Here
|
654 |
Atom window_type; |
654 |
Atom window_type; |
655 |
BOOL redirect = FALSE; |
655 |
BOOL redirect = FALSE; |
656 |
|
656 |
|
|
|
657 |
window_type = xfc->_NET_WM_WINDOW_TYPE_NORMAL; |
658 |
|
657 |
if ((ex_style & WS_EX_NOACTIVATE) || (ex_style & WS_EX_TOOLWINDOW)) |
659 |
if ((ex_style & WS_EX_NOACTIVATE) || (ex_style & WS_EX_TOOLWINDOW)) |
658 |
{ |
660 |
{ |
659 |
redirect = TRUE; |
661 |
redirect = TRUE; |
Lines 669-684
void xf_SetWindowStyle(xfContext* xfc, xfAppWindow* appWindow, UINT32 style, UIN
Link Here
|
669 |
{ |
671 |
{ |
670 |
window_type = xfc->_NET_WM_WINDOW_TYPE_NORMAL; |
672 |
window_type = xfc->_NET_WM_WINDOW_TYPE_NORMAL; |
671 |
} |
673 |
} |
672 |
else if (style & WS_POPUP) |
674 |
|
|
|
675 |
if (style & WS_POPUP) |
673 |
{ |
676 |
{ |
674 |
/* this includes dialogs, popups, etc, that need to be full-fledged windows */ |
|
|
675 |
appWindow->is_transient = TRUE; |
676 |
window_type = xfc->_NET_WM_WINDOW_TYPE_DIALOG; |
677 |
window_type = xfc->_NET_WM_WINDOW_TYPE_DIALOG; |
677 |
xf_SetWindowUnlisted(xfc, appWindow->handle); |
678 |
/* this includes dialogs, popups, etc, that need to be full-fledged windows */ |
|
|
679 |
|
680 |
if (!((ex_style & WS_EX_DLGMODALFRAME) || (ex_style & WS_EX_LAYERED) || (style & WS_SYSMENU))) |
681 |
{ |
682 |
appWindow->is_transient = TRUE; |
683 |
redirect = TRUE; |
684 |
|
685 |
xf_SetWindowUnlisted(xfc, appWindow->handle); |
686 |
} |
678 |
} |
687 |
} |
679 |
else |
688 |
|
|
|
689 |
if (!(style == 0 && ex_style == 0)) |
680 |
{ |
690 |
{ |
681 |
window_type = xfc->_NET_WM_WINDOW_TYPE_NORMAL; |
691 |
xf_SetWindowActions(xfc, appWindow); |
682 |
} |
692 |
} |
683 |
|
693 |
|
684 |
{ |
694 |
{ |
Lines 700-705
void xf_SetWindowStyle(xfContext* xfc, xfAppWindow* appWindow, UINT32 style, UIN
Link Here
|
700 |
PropModeReplace, (BYTE*)&window_type, 1); |
710 |
PropModeReplace, (BYTE*)&window_type, 1); |
701 |
} |
711 |
} |
702 |
|
712 |
|
|
|
713 |
void xf_SetWindowActions(xfContext* xfc, xfAppWindow* appWindow) |
714 |
{ |
715 |
Atom allowed_actions[] = { |
716 |
xfc->_NET_WM_ACTION_CLOSE, |
717 |
xfc->_NET_WM_ACTION_MINIMIZE, |
718 |
xfc->_NET_WM_ACTION_MOVE, |
719 |
xfc->_NET_WM_ACTION_RESIZE, |
720 |
xfc->_NET_WM_ACTION_MAXIMIZE_HORZ, |
721 |
xfc->_NET_WM_ACTION_MAXIMIZE_VERT, |
722 |
xfc->_NET_WM_ACTION_FULLSCREEN, |
723 |
xfc->_NET_WM_ACTION_CHANGE_DESKTOP |
724 |
}; |
725 |
|
726 |
if (!(appWindow->dwStyle & WS_SYSMENU)) |
727 |
allowed_actions[0] = 0; |
728 |
|
729 |
if (!(appWindow->dwStyle & WS_MINIMIZEBOX)) |
730 |
allowed_actions[1] = 0; |
731 |
|
732 |
if (!(appWindow->dwStyle & WS_SIZEBOX)) |
733 |
allowed_actions[3] = 0; |
734 |
|
735 |
if (!(appWindow->dwStyle & WS_MAXIMIZEBOX)) |
736 |
{ |
737 |
allowed_actions[4] = 0; |
738 |
allowed_actions[5] = 0; |
739 |
allowed_actions[6] = 0; |
740 |
} |
741 |
|
742 |
XChangeProperty(xfc->display, appWindow->handle, xfc->_NET_WM_ALLOWED_ACTIONS, XA_ATOM, 32, |
743 |
PropModeReplace, (unsigned char *) &allowed_actions, 8); |
744 |
} |
745 |
|
703 |
void xf_SetWindowText(xfContext* xfc, xfAppWindow* appWindow, const char* name) |
746 |
void xf_SetWindowText(xfContext* xfc, xfAppWindow* appWindow, const char* name) |
704 |
{ |
747 |
{ |
705 |
xf_SetWindowTitleText(xfc, appWindow->handle, name); |
748 |
xf_SetWindowTitleText(xfc, appWindow->handle, name); |