Skip to content

Fixed the issue where windows can't be moved on macOS in the docking branch. #8777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

Gemxi
Copy link

@Gemxi Gemxi commented Jul 6, 2025

Fixed the issue where windows can't be moved on macOS in the docking branch.
Sub-windows cannot be moved with multiple viewports.

Gemxi and others added 3 commits July 5, 2025 03:08
…branch.

Sub-windows cannot be moved with multiple viewports.
When used with FreeType this value is passed as `face_index` which needs to be 32-bits.

# Conflicts:
#	docs/CHANGELOG.txt
@PathogenDavid
Copy link
Contributor

@Gemxi Since your your branch is based on the docking branch, you need to base your PR on the docking branch.

You can change it by clicking the Edit button at the very top of this PR (it's up by the title of the PR.)

@Gemxi Gemxi changed the base branch from master to docking July 6, 2025 15:59
@Gemxi
Copy link
Author

Gemxi commented Jul 6, 2025

@Gemxi Since your your branch is based on the docking branch, you need to base your PR on the docking branch.

You can change it by clicking the Edit button at the very top of this PR (it's up by the title of the PR.)

I did. Thank you!

@ocornut
Copy link
Owner

ocornut commented Jul 8, 2025

Hello,
Thanks for your PR.
Could you

Sorry I seldomly use the Mac so it's difficult for me to understand what's going on here.

@cfillion
Copy link
Contributor

cfillion commented Jul 8, 2025

For mouse events sent via ImGui_ImplOSX_AddTrackingArea, view.window is always the main viewport as passed to ImplOSX_Init. Therefore FindViewportByPlatformHandle(view.window)->PlatformHandleRaw == event.window fails.

Shouldn't the entire check just be this instead?

// Only process events from windows containing an ImGui viewport
if (!ImGui::FindViewportByPlatformHandle((__bridge void*)event.window))
    return false;

@ocornut
Copy link
Owner

ocornut commented Jul 8, 2025

It was my assumption in
#8644 (comment)

But I didn’t test any of this myself. Could you test Christian ?

@ocornut
Copy link
Owner

ocornut commented Jul 8, 2025

I booted the Mac and tested this, and pushed ee8fd53. Which matches my initial suggestion and @BingoXuan message posted (which I had overlooked) after I merged their initial version.

@ocornut ocornut closed this Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants