You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: HG 2.1 Reported for operating system, platform: Mac OS X (All), x86
Comments on the original bug report:
On 2020-03-25 23:51:29 +0000, wrote:
On Windows and X11, we can use CreateWindowFrom on arbitrary native widgets (referenced with either HWND or the xid) to embed an SDL window inside a larger widget layout.
On macOS, CreateWindowFrom only supports being called with an NSWindow* object. It should support being called with NSView* objects as well.
This is useful for e.g. games, game editors, simulations, etc.
On 2020-03-25 23:57:09 +0000, wrote:
Created attachment 4280
[PATCH] cocoa: allow calling CreateWindowFrom on an NSView
Here's an attempt at allowing CreateWindowFrom to work with NSViews.
It expands the role of the existing sdlContentView field (caches [nswindow contentView] for created windows, since Cocoa complains if contentview is called off the main thread) to hold the NSView for non-created windows as well. All calls to [nswindow contentView] have been replaced with references to sdlContentView.
When an NSView is passed into CreateWindowFrom, it sets sdlContentView directly, and finds the associated window with [nsview window].
Tested with a basic Qt application, and with testdraw2 and testgl2 from the tests directory.
On 2020-03-26 00:04:11 +0000, wrote:
Comment on attachment 4280
[PATCH] cocoa: allow calling CreateWindowFrom on an NSView
On 2020-03-26 18:20:04 +0000, Eric Shepherd (:sheppy) wrote:
This patch looks promising. I will try to come up with time to try it out myself as well.
On 2020-04-07 18:31:35 +0000, Ryan C. Gordon wrote:
This looks reasonable to me. I've put it in revision control at https://hg.libsdl.org/SDL/rev/6d22d6ce725c ... Eric, if you want to try it, just get the latest revision of SDL.
Thanks!
--ryan.
On 2020-09-16 03:38:11 +0000, zeb wrote:
I have tried the newest version from the hg repos. The problem has not been resolved.
The right panel should be filled with red color, but the whole window has beed filled.
On 2020-09-19 17:51:27 +0000, wrote:
@zeb This issue was about CreateWindowFrom not working at all on macOS, leading to crashes or at the least a failure to create a window. That issue has been fixed.
What you're writing about is not the same issue: CreateFromWindow gives you a working SDL window (what this bug fixed), just not the one you want (not part of this but). Honestly it sounds like a wxWidgets issue not giving an NSView for the widget you want.
I'm reclosing this — if you need support for your issue, please take it to the forums. (If in the end it is determined to be an SDL issue, then please create a new bug.)
On 2020-09-19 17:51:51 +0000, wrote:
.
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: HG 2.1
Reported for operating system, platform: Mac OS X (All), x86
Comments on the original bug report:
On 2020-03-25 23:51:29 +0000, wrote:
On 2020-03-25 23:57:09 +0000, wrote:
On 2020-03-26 00:04:11 +0000, wrote:
On 2020-03-26 18:20:04 +0000, Eric Shepherd (:sheppy) wrote:
On 2020-04-07 18:31:35 +0000, Ryan C. Gordon wrote:
On 2020-09-16 03:38:11 +0000, zeb wrote:
On 2020-09-19 17:51:27 +0000, wrote:
On 2020-09-19 17:51:51 +0000, wrote:
The text was updated successfully, but these errors were encountered: