mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Linux mouse-drag fix.
This commit is contained in:
parent
1f6e0aed9d
commit
a97fb3024d
1 changed files with 4 additions and 32 deletions
|
|
@ -1519,41 +1519,13 @@ public:
|
|||
void handleMotionNotifyEvent (const XPointerMovedEvent& movedEvent)
|
||||
{
|
||||
updateKeyModifiers (movedEvent.state);
|
||||
const Point<int> mousePos (movedEvent.x_root, movedEvent.y_root);
|
||||
|
||||
if (lastMousePos != mousePos)
|
||||
{
|
||||
lastMousePos = mousePos;
|
||||
|
||||
if (parentWindow != 0 && (styleFlags & windowHasTitleBar) == 0)
|
||||
{
|
||||
Window wRoot = 0, wParent = 0;
|
||||
|
||||
{
|
||||
ScopedXLock xlock;
|
||||
unsigned int numChildren;
|
||||
Window* wChild = nullptr;
|
||||
XQueryTree (display, windowH, &wRoot, &wParent, &wChild, &numChildren);
|
||||
}
|
||||
|
||||
if (wParent != 0
|
||||
&& wParent != windowH
|
||||
&& wParent != wRoot)
|
||||
{
|
||||
parentWindow = wParent;
|
||||
updateBounds();
|
||||
}
|
||||
else
|
||||
{
|
||||
parentWindow = 0;
|
||||
}
|
||||
}
|
||||
lastMousePos = Point<int> (movedEvent.x_root, movedEvent.y_root);
|
||||
|
||||
if (dragState.dragging)
|
||||
handleExternalDragMotionNotify();
|
||||
|
||||
handleMouseEvent (0, mousePos - getScreenPosition(), currentModifiers, getEventTime (movedEvent));
|
||||
}
|
||||
handleMouseEvent (0, getMousePos (movedEvent), currentModifiers, getEventTime (movedEvent));
|
||||
}
|
||||
|
||||
void handleEnterNotifyEvent (const XEnterWindowEvent& enterEvent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue