From 5a9a29f8e8e753b38226999f66365d96fc4b6293 Mon Sep 17 00:00:00 2001 From: gabriel pettier Date: Thu, 14 Jan 2016 20:15:17 +0100 Subject: [PATCH] WM_TOUCH: don't offset touch with caption size when fullscreen --- kivy/input/providers/wm_touch.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kivy/input/providers/wm_touch.py b/kivy/input/providers/wm_touch.py index 47cba895b..71e8c0400 100644 --- a/kivy/input/providers/wm_touch.py +++ b/kivy/input/providers/wm_touch.py @@ -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()