Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Office
Calligra
Commits
48903124
Commit
48903124
authored
Dec 18, 2013
by
Dmitry Kazakov
Browse files
Fix pressure sensitivity in the Scratch Pad
BUG:328955
parent
15972fc9
Changes
1
Hide whitespace changes
Inline
Side-by-side
krita/ui/input/wintab/kis_tablet_support_win.cpp
View file @
48903124
...
...
@@ -346,20 +346,28 @@ bool translateTabletEvent(const MSG &msg, PACKET *localPacketBuf,
QPoint
globalPos
(
qRound
(
hiResGlobal
.
x
()),
qRound
(
hiResGlobal
.
y
()));
// make sure the tablet event get's sent to the proper widget...
QWidget
*
w
=
QApplication
::
activePopupWidget
()
;
QWidget
*
w
=
0
;
/**
* Find the appropriate window in an order of preference
*/
if
(
!
w
)
w
=
qApp
->
widgetAt
(
globalPos
);
if
(
!
w
)
w
=
QWidget
::
find
(
msg
.
hwnd
);
QWidget
*
parentOverride
=
0
;
if
(
!
parentOverride
)
parentOverride
=
qApp
->
activePopupWidget
();
if
(
!
parentOverride
)
parentOverride
=
qApp
->
activeModalWidget
();
if
(
!
w
||
(
parentOverride
&&
!
parentOverride
->
isAncestorOf
(
w
)))
{
w
=
parentOverride
;
}
if
(
kis_tablet_pressed
)
{
w
=
kis_tablet_pressed
;
}
if
(
!
w
)
w
=
qApp
->
activeModalWidget
();
if
(
!
w
)
w
=
qApp
->
widgetAt
(
globalPos
);
if
(
!
w
)
w
=
QWidget
::
find
(
msg
.
hwnd
);
if
(
t
==
KisTabletEvent
::
TabletPressEx
&&
!
kis_tablet_pressed
)
{
kis_tablet_pressed
=
w
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment