mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-27 02:20:05 +00:00
XWindowSystem: Specify mouse coordinates for resize in terms of the root window rather than the application window
This commit is contained in:
parent
1e7b91b4d2
commit
810e348ff7
3 changed files with 5 additions and 7 deletions
|
|
@ -1790,7 +1790,6 @@ void XWindowSystem::setBounds (::Window windowH, Rectangle<int> newBounds, bool
|
|||
}
|
||||
|
||||
void XWindowSystem::startHostManagedResize (::Window windowH,
|
||||
Point<int> mouseDown,
|
||||
ResizableBorderComponent::Zone zone)
|
||||
{
|
||||
const auto moveResize = XWindowSystemUtilities::Atoms::getIfExists (display, "_NET_WM_MOVERESIZE");
|
||||
|
|
@ -1803,6 +1802,7 @@ void XWindowSystem::startHostManagedResize (::Window windowH,
|
|||
X11Symbols::getInstance()->xUngrabPointer (display, CurrentTime);
|
||||
|
||||
const auto root = X11Symbols::getInstance()->xRootWindow (display, X11Symbols::getInstance()->xDefaultScreen (display));
|
||||
const auto mouseDown = getCurrentMousePosition();
|
||||
|
||||
XClientMessageEvent clientMsg;
|
||||
clientMsg.display = display;
|
||||
|
|
@ -1810,8 +1810,8 @@ void XWindowSystem::startHostManagedResize (::Window windowH,
|
|||
clientMsg.type = ClientMessage;
|
||||
clientMsg.format = 32;
|
||||
clientMsg.message_type = moveResize;
|
||||
clientMsg.data.l[0] = mouseDown.getX();
|
||||
clientMsg.data.l[1] = mouseDown.getY();
|
||||
clientMsg.data.l[0] = (long) mouseDown.x;
|
||||
clientMsg.data.l[1] = (long) mouseDown.y;
|
||||
clientMsg.data.l[2] = [&]
|
||||
{
|
||||
// It's unclear which header is supposed to contain these
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue