Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit01c3876

Browse files
committed
fix(bar): prevent processing desktop windows in foreground check
1 parent86fe838 commit01c3876

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎src/core/bar.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,15 @@ def is_foreground_fullscreen(self):
208208
hwnd=win32gui.GetForegroundWindow()
209209
ifnothwnd:
210210
return
211-
211+
hwnd_class_name=win32gui.GetClassName(hwnd)
212+
213+
# Check if the foreground window is the desktop
214+
ifhwnd_class_namein ["Progman","WorkerW"]:
215+
return
212216
# Get the window rectangle: (left, top, right, bottom) then convert to (x, y, width, height)
213217
rect=win32gui.GetWindowRect(hwnd)
214218
window_rect= (rect[0],rect[1],rect[2]-rect[0],rect[3]-rect[1])
215-
219+
216220
# Get the primary screen geometry
217221
screen_geometry=self.screen().geometry()
218222
screen_rect= (
@@ -221,6 +225,7 @@ def is_foreground_fullscreen(self):
221225
screen_geometry.width(),
222226
screen_geometry.height()
223227
)
228+
224229
# Determine fullscreen state
225230
is_fullscreen= (window_rect==screen_rect)
226231
# Cache the previous state so we only update if it changes

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp