Don't let plugins make the main window transparent (#3809)
* Don't let plugins make the main window transparent * Don't clear WS_EX_LAYERED if it was already set
This commit is contained in:
@@ -62,3 +62,27 @@ bool MainApplication::event(QEvent* event)
|
||||
return QApplication::event(event);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
bool MainApplication::winEventFilter(MSG* msg, long* result)
|
||||
{
|
||||
switch(msg->message)
|
||||
{
|
||||
case WM_STYLECHANGING:
|
||||
if(msg->wParam == GWL_EXSTYLE)
|
||||
{
|
||||
// Prevent plugins making the main window transparent
|
||||
STYLESTRUCT * style = reinterpret_cast<STYLESTRUCT *>(msg->lParam);
|
||||
if(!(style->styleOld & WS_EX_LAYERED))
|
||||
{
|
||||
style->styleNew &= ~WS_EX_LAYERED;
|
||||
}
|
||||
*result = 0;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user