fix: Remove activateWindow() call to fix focus warning
Widgets have Qt::WindowDoesNotAcceptFocus flag set so they don't steal focus from the game. Calling activateWindow() on them produces a warning. Removed activateWindow() call since: 1. Widgets should not accept focus (they're overlays) 2. raise_() is sufficient to bring them to front 3. WindowDoesNotAcceptFocus is intentional for game overlay widgets
This commit is contained in:
parent
84b73298e8
commit
d73020db99
|
|
@ -1750,10 +1750,9 @@ class OverlayWindow(QMainWindow):
|
||||||
y = (screen.height() - 100) // 2
|
y = (screen.height() - 100) // 2
|
||||||
widget.move(x, y)
|
widget.move(x, y)
|
||||||
|
|
||||||
# Show and raise
|
# Show and raise (don't activate - widgets have WindowDoesNotAcceptFocus)
|
||||||
widget.show()
|
widget.show()
|
||||||
widget.raise_()
|
widget.raise_()
|
||||||
widget.activateWindow()
|
|
||||||
|
|
||||||
# Store reference to prevent garbage collection
|
# Store reference to prevent garbage collection
|
||||||
if not hasattr(self, '_active_widgets'):
|
if not hasattr(self, '_active_widgets'):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue