mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-19 15:44:07 +00:00
add new function
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@188 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -389,3 +389,8 @@ void MwLLDetach(MwLL handle, MwPoint* point) {
|
||||
|
||||
SetWindowLongPtr(handle->hWnd, GWL_STYLE, style);
|
||||
}
|
||||
|
||||
void MwLLShow(MwLL handle, int show) {
|
||||
ShowWindow(handle->hWnd, show ? SW_NORMAL : SW_HIDE);
|
||||
if(show) SetFocus(handle->hWnd);
|
||||
}
|
||||
|
||||
@@ -387,7 +387,13 @@ void MwLLDetach(MwLL handle, MwPoint* point) {
|
||||
XTranslateCoordinates(handle->display, parent, RootWindow(handle->display, DefaultScreen(handle->display)), 0, 0, &x, &y, &child);
|
||||
|
||||
XReparentWindow(handle->display, handle->window, RootWindow(handle->display, DefaultScreen(handle->display)), x + point->x, y + point->y);
|
||||
|
||||
XMapWindow(handle->display, handle->window);
|
||||
// XSetInputFocus(handle->display, handle->window, RevertToNone, CurrentTime);
|
||||
}
|
||||
|
||||
void MwLLShow(MwLL handle, int show) {
|
||||
if(show) {
|
||||
XMapWindow(handle->display, handle->window);
|
||||
XSetInputFocus(handle->display, handle->window, RevertToNone, CurrentTime);
|
||||
} else {
|
||||
XUnmapWindow(handle->display, handle->window);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user