WM_TOUCH: don't offset touch with caption size when fullscreen

This commit is contained in:
gabriel pettier 2016-01-14 20:15:17 +01:00
parent b1386c36fb
commit 5a9a29f8e8
1 changed files with 5 additions and 1 deletions

View File

@ -14,6 +14,7 @@ from kivy.input.providers.wm_common import (
TOUCHEVENTF_MOVE, SM_CYCAPTION)
from kivy.input.motionevent import MotionEvent
from kivy.input.shape import ShapeRect
from kivy.core.window import Window
class WM_MotionEvent(MotionEvent):
@ -147,7 +148,10 @@ else:
self.old_windProc = SetWindowLong_wrapper(
self.hwnd, GWL_WNDPROC, self.new_windProc)
self.caption_size = windll.user32.GetSystemMetrics(SM_CYCAPTION)
if Window.borderless or Window.fullscreen:
self.caption_size = 0
else:
self.caption_size = windll.user32.GetSystemMetrics(SM_CYCAPTION)
def update(self, dispatch_fn):
win_rect = RECT()