mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-29 22:55:56 +08:00
fix bug #436
This commit is contained in:
parent
d9e10efe9c
commit
50f7071172
@ -325,13 +325,13 @@ void FluFramelessHelper::componentComplete(){
|
||||
exstyle = exstyle | WS_EX_LAYERED;
|
||||
SetWindowLongPtr(hwnd, GWL_EXSTYLE, exstyle);
|
||||
SetLayeredWindowAttributes(hwnd, RGB(251, 255, 242), 0, LWA_COLORKEY);
|
||||
SetWindowPos(hwnd,nullptr,0,0,0,0,SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
|
||||
connect(window,&QQuickWindow::activeChanged,this,[this,hwnd]{
|
||||
if(this->window->isActive()){
|
||||
LONG exstyle = ::GetWindowLong(hwnd, GWL_EXSTYLE);
|
||||
if(exstyle & WS_EX_LAYERED){
|
||||
exstyle = exstyle &~ WS_EX_LAYERED;
|
||||
SetWindowLongPtr(hwnd, GWL_EXSTYLE, exstyle);
|
||||
SetWindowPos(hwnd,nullptr,0,0,0,0,SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user