move some to lowlevel

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@675 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-11-12 18:37:07 +00:00
parent 94e0fe41c0
commit b617d147c3
7 changed files with 73 additions and 65 deletions

View File

@@ -691,3 +691,10 @@ char* MwLLGetClipboard(MwLL handle) {
}
return r;
}
void MwLLMakeToolWindow(MwLL handle) {
LPARAM lp = GetWindowLongPtr(handle->hWnd, GWL_STYLE) & WS_VISIBLE;
SetWindowLongPtr(handle->hWnd, GWL_STYLE, (LPARAM)lp);
SetWindowLongPtr(handle->hWnd, GWL_EXSTYLE, (LPARAM)WS_EX_TOOLWINDOW);
}

View File

@@ -946,3 +946,14 @@ char* MwLLGetClipboard(MwLL handle) {
return r;
}
void MwLLMakeToolWindow(MwLL handle) {
XSetWindowAttributes xswa;
Atom wndtype = XInternAtom(handle->display, "_NET_WM_WINDOW_TYPE", False);
Atom wndmenu = XInternAtom(handle->display, "_NET_WM_WINDOW_TYPE_MENU", False);
xswa.override_redirect = True;
XChangeWindowAttributes(handle->display, handle->window, CWOverrideRedirect, &xswa);
XChangeProperty(handle->display, handle->window, wndtype, XA_ATOM, 32, PropModeReplace, (unsigned char*)&wndmenu, 1);
}