Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

[release-8.3] Fix 988924: Some commands (save, undo) do not work if editor is detat… #9220

Open
wants to merge 1 commit into
base: release-8.3
Choose a base branch
from

Conversation

monojenkins
Copy link
Contributor

…ched from IDE into its own window

Problem is that when command comes in, it first goes to CocoaTextViewControl and then up NSView treeview, problem starts when migrating to GTK treeview because GtkNSViewHost is not set as it should be, after debugging why this happens it appears that GetFocusedChild method wasn't returning GtkNSViewHost as expected, upon further debugging it turns out thats because logic of drilling down GTK treeview doesn't work because GetFocusedChild parameter is NSWindow instead of GtkWindow. So fix is to convert NSWindow to GtkWindow and now everything works as expected. Reason we are getting NSWindow instead of GtkWindow is somewhere in GetActiveWindow method, but I'm not sure if its bug or not....

Backport of #9218.

/cc @sandyarmstrong @DavidKarlas

@sandyarmstrong sandyarmstrong added Area: VS Text Editor For issues and pull requests concerning the new native Cocoa VS Text Editor in Visual Studio for Mac do-not-merge labels Nov 5, 2019
@sandyarmstrong
Copy link
Member

@monojenkins rebase

…ched from IDE into its own window

Problem is that when command comes in, it first goes to CocoaTextViewControl and then up NSView treeview, problem starts when migrating to GTK treeview because GtkNSViewHost is not set as it should be, after debugging why this happens it appears that `GetFocusedChild` method wasn't returning `GtkNSViewHost` as expected, upon further debugging it turns out thats because logic of drilling down GTK treeview doesn't work because `GetFocusedChild` parameter is `NSWindow` instead of `GtkWindow`. So fix is to convert `NSWindow` to `GtkWindow` and now everything works as expected. Reason we are getting `NSWindow` instead of `GtkWindow` is somewhere in `GetActiveWindow` method, but I'm not sure if its bug or not....
@monojenkins monojenkins force-pushed the backport-pr-9218-to-release-8.3 branch from 0c62a9a to a83369a Compare November 8, 2019 16:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: VS Text Editor For issues and pull requests concerning the new native Cocoa VS Text Editor in Visual Studio for Mac do-not-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants