Skip to content
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

Implement HasRawWindowHandle for GTK? #1609

Open
cmyr opened this issue Feb 20, 2021 · 2 comments
Open

Implement HasRawWindowHandle for GTK? #1609

cmyr opened this issue Feb 20, 2021 · 2 comments
Labels
missing a feature is missing on a specific platform shell/gtk concerns the GTK backend

Comments

@cmyr
Copy link
Member

cmyr commented Feb 20, 2021

This was added for the mac and windows in #1586.

curious to hear if this was a decision or an omission.

This was discussed. I have no access to non-Windows platforms and little knowledge about them, so rather than doing a blind implementation likely to be buggy, implementations on those missing platforms is left for a future change by whoever can contribute it. I did Windows and @rjwittams did macOS.

Originally posted by @djeedai in #1586 (comment)

@cmyr cmyr added missing a feature is missing on a specific platform shell/gtk concerns the GTK backend shell/x11 concerns the X11 backend labels Feb 20, 2021
@djeedai
Copy link
Contributor

djeedai commented Feb 20, 2021

Some notes: I looked at GTK and X11, and X11 is probably trivial (but I'd rather someone do it who can also test it). GTK however is an odd one because it's not a platform but already a platform abstraction itself, so this would require a bit of work to go fetch the right raw platform handle for the current platform config, if at all possible (I think it is, but couldn't find the appropriate wrapper in the Rust binding).

@emigr2k1
Copy link
Contributor

emigr2k1 commented Mar 11, 2021

GTK is also easy (for x11 atleast) but I don't think the bindings have an easy way to get the xdisplay.

There's gdk_x11_window_get_xid to get the xlib window. The corresponding function in the bindings is here.

To get the xdisplay we have gdk_x11_display_get_xdisplay but in the bindings I don't see how I can get the raw pointer.

I opened an issue in the gtk-rs repo to see if I can get some help.

@maan2003 maan2003 removed the shell/x11 concerns the X11 backend label May 3, 2021
@maan2003 maan2003 changed the title Implement HasRawWindowHandle for x11, maybe GTK? Implement HasRawWindowHandle for GTK? Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing a feature is missing on a specific platform shell/gtk concerns the GTK backend
Projects
None yet
Development

No branches or pull requests

4 participants