Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:bespokesynth:libs
JUCE7_06
XWindowSystem-Specify-mouse-coordinates-for-res...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File XWindowSystem-Specify-mouse-coordinates-for-resize.patch of Package JUCE7_06
From 810e348ff77733823b274f068bacdfb3e80e51bd Mon Sep 17 00:00:00 2001 From: reuk <reuk@users.noreply.github.com> Date: Wed, 3 Jan 2024 16:41:21 +0000 Subject: [PATCH] XWindowSystem: Specify mouse coordinates for resize in terms of the root window rather than the application window --- modules/juce_gui_basics/native/juce_Windowing_linux.cpp | 5 ++--- modules/juce_gui_basics/native/juce_XWindowSystem_linux.cpp | 6 +++--- modules/juce_gui_basics/native/juce_XWindowSystem_linux.h | 1 - 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/juce_gui_basics/native/juce_Windowing_linux.cpp b/modules/juce_gui_basics/native/juce_Windowing_linux.cpp index 9f4b8aa798f3..e103291b5891 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_linux.cpp +++ b/modules/juce_gui_basics/native/juce_Windowing_linux.cpp @@ -399,10 +399,9 @@ class LinuxComponentPeer final : public ComponentPeer, void clearWindowAssociation() { association = {}; } - void startHostManagedResize (Point<int> mouseDownPosition, - ResizableBorderComponent::Zone zone) override + void startHostManagedResize (Point<int>, ResizableBorderComponent::Zone zone) override { - XWindowSystem::getInstance()->startHostManagedResize (windowH, mouseDownPosition, zone); + XWindowSystem::getInstance()->startHostManagedResize (windowH, zone); } //============================================================================== diff --git a/modules/juce_gui_basics/native/juce_XWindowSystem_linux.cpp b/modules/juce_gui_basics/native/juce_XWindowSystem_linux.cpp index 20cfe8087dc4..f492d1081494 100644 --- a/modules/juce_gui_basics/native/juce_XWindowSystem_linux.cpp +++ b/modules/juce_gui_basics/native/juce_XWindowSystem_linux.cpp @@ -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 diff --git a/modules/juce_gui_basics/native/juce_XWindowSystem_linux.h b/modules/juce_gui_basics/native/juce_XWindowSystem_linux.h index 30af0747a6da..0186d457130b 100644 --- a/modules/juce_gui_basics/native/juce_XWindowSystem_linux.h +++ b/modules/juce_gui_basics/native/juce_XWindowSystem_linux.h @@ -242,7 +242,6 @@ class XWindowSystem : public DeletedAtShutdown bool isX11Available() const noexcept { return xIsAvailable; } void startHostManagedResize (::Window window, - Point<int> mouseDown, ResizableBorderComponent::Zone zone); static String getWindowScalingFactorSettingName() { return "Gdk/WindowScalingFactor"; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor