File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
src/modules/fancyzones/FancyZonesLib Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 29
29
#include < FancyZonesLib/VirtualDesktop.h>
30
30
#include < FancyZonesLib/WindowKeyboardSnap.h>
31
31
#include < FancyZonesLib/WindowMouseSnap.h>
32
+ #include < FancyZonesLib/WindowUtils.h>
32
33
#include < FancyZonesLib/WorkArea.h>
33
34
#include < FancyZonesLib/WorkAreaConfiguration.h>
34
35
@@ -394,6 +395,15 @@ void FancyZones::WindowCreated(HWND window) noexcept
394
395
return ;
395
396
}
396
397
398
+ // Hotfix
399
+ // Avoid automatically moving popup windows, as they can be just popup menus.
400
+ bool isPopup = FancyZonesWindowUtils::IsPopupWindow (window);
401
+ bool hasThickFrame = FancyZonesWindowUtils::HasThickFrame (window);
402
+ if (isPopup && !hasThickFrame)
403
+ {
404
+ return ;
405
+ }
406
+
397
407
// Avoid already stamped (zoned) windows
398
408
const bool isZoned = !FancyZonesWindowProperties::RetrieveZoneIndexProperty (window).empty ();
399
409
if (isZoned)
Original file line number Diff line number Diff line change @@ -192,6 +192,12 @@ bool FancyZonesWindowUtils::IsPopupWindow(HWND window) noexcept
192
192
return ((style & WS_POPUP) == WS_POPUP);
193
193
}
194
194
195
+ bool FancyZonesWindowUtils::HasThickFrame (HWND window) noexcept
196
+ {
197
+ auto style = GetWindowLong (window, GWL_STYLE);
198
+ return ((style & WS_THICKFRAME) == WS_THICKFRAME);
199
+ }
200
+
195
201
bool FancyZonesWindowUtils::HasThickFrameAndMinimizeMaximizeButtons (HWND window) noexcept
196
202
{
197
203
auto style = GetWindowLong (window, GWL_STYLE);
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ namespace FancyZonesWindowUtils
20
20
bool HasVisibleOwner (HWND window) noexcept ;
21
21
bool IsStandardWindow (HWND window);
22
22
bool IsPopupWindow (HWND window) noexcept ;
23
+ bool HasThickFrame (HWND window) noexcept ;
23
24
bool HasThickFrameAndMinimizeMaximizeButtons (HWND window) noexcept ;
24
25
bool IsProcessOfWindowElevated (HWND window); // If HWND is already dead, we assume it wasn't elevated
25
26
You can’t perform that action at this time.
0 commit comments