mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
fix
This commit is contained in:
parent
4a6208a271
commit
438222e9db
@ -18,6 +18,8 @@ def grabwindow(app="PNG", callback_origin=None):
|
||||
hwndx = gobject.baseobject.hwnd
|
||||
if not hwndx:
|
||||
hwndx = windows.GetForegroundWindow()
|
||||
else:
|
||||
hwndx = windows.GetAncestor(hwndx)
|
||||
gamepath = getpidexe(windows.GetWindowThreadProcessId(hwndx))
|
||||
exename = os.path.basename(gamepath).replace(
|
||||
"." + os.path.basename(gamepath).split(".")[-1], ""
|
||||
@ -65,7 +67,8 @@ def grabwindow(app="PNG", callback_origin=None):
|
||||
hwnd = gobject.baseobject.hwnd
|
||||
if not hwnd:
|
||||
hwnd = windows.GetForegroundWindow()
|
||||
|
||||
else:
|
||||
hwnd = windows.GetAncestor(hwnd)
|
||||
_ = windows.GetClientRect(hwnd)
|
||||
p = screenshot(0, 0, _[2], _[3], hwnd).toImage()
|
||||
if not p.allGray():
|
||||
|
@ -431,9 +431,6 @@ def minmaxmoveobservefunc(self):
|
||||
myhwnd = gobject.baseobject.hwnd
|
||||
if not myhwnd:
|
||||
return
|
||||
mymyhwnd = windows.GetAncestor(myhwnd)
|
||||
if myhwnd != mymyhwnd:
|
||||
gobject.baseobject.hwnd = myhwnd = mymyhwnd
|
||||
if (
|
||||
event == windows.EVENT_OBJECT_DESTROY
|
||||
and idObject == windows.OBJID_WINDOW
|
||||
|
@ -1,4 +1,5 @@
|
||||
from myutils.wrapper import threader
|
||||
import windows
|
||||
|
||||
|
||||
class scalebase:
|
||||
@ -20,6 +21,7 @@ class scalebase:
|
||||
self.callstatuschange_(hwnd)
|
||||
|
||||
def callstatuschange_(self, hwnd):
|
||||
hwnd = windows.GetAncestor(hwnd)
|
||||
self.hwnd = hwnd
|
||||
if self.changestatus(hwnd, self.full):
|
||||
self.setuistatus(self.full)
|
||||
|
@ -29,7 +29,7 @@ include(generate_product_version)
|
||||
|
||||
set(VERSION_MAJOR 5)
|
||||
set(VERSION_MINOR 31)
|
||||
set(VERSION_PATCH 4)
|
||||
set(VERSION_PATCH 5)
|
||||
|
||||
add_library(pch pch.cpp)
|
||||
target_precompile_headers(pch PUBLIC pch.h)
|
||||
|
Loading…
x
Reference in New Issue
Block a user