This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-30
Channels
- # announcements (8)
- # babashka (102)
- # beginners (312)
- # calva (9)
- # clj-kondo (9)
- # cljfx (7)
- # clojure (128)
- # clojure-europe (52)
- # clojure-nl (2)
- # clojure-norway (2)
- # clojure-spec (5)
- # clojure-uk (4)
- # clojurescript (13)
- # conjure (5)
- # cursive (5)
- # datalog (18)
- # datomic (8)
- # emacs (1)
- # events (3)
- # fulcro (16)
- # graphql (2)
- # gratitude (1)
- # helix (16)
- # inf-clojure (17)
- # introduce-yourself (9)
- # java (11)
- # lambdaisland (3)
- # leiningen (3)
- # lsp (8)
- # malli (3)
- # membrane (7)
- # missionary (26)
- # nextjournal (1)
- # off-topic (19)
- # pathom (3)
- # polylith (13)
- # portal (16)
- # reagent (39)
- # reitit (2)
- # releases (23)
- # remote-jobs (1)
- # shadow-cljs (40)
- # specter (3)
- # sql (12)
- # tools-deps (8)
- # tree-sitter (1)
- # vim (3)
- # web-security (6)
- # xtdb (16)
Time for a crazy java question. My goal is to do in Java/AWT/X11 what happens in vroot.h: find the ID of an existing window and use that ID to draw in that window. Easy to do in C. But Java necessarily covers that up. I believe all I need to do is take the line below and replace the call to XCreateWindow and just assign the window ID I have. https://github.com/openjdk/client/blob/master/src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java#L380 The question is how to do that without patching AWT itself.
I think I can do that by extending all of the classes in this tree? Class XWindowPeer
sun.awt.X11.XBaseWindow <-- XCreateWindow happens here
sun.awt.X11.XWindow
sun.awt.X11.XComponentPeer
sun.awt.X11.XCanvasPeer
sun.awt.X11.XPanelPeer
sun.awt.X11.XWindowPeer
symbol: class ForeignComponentPeer
/home/robbie/Wrkspc/jnatest/src/java/XForeignComponentPeer.java:112: error: cannot find symbol
XForeignComponentPeer (XCreateWindowParams params) {
I put this in project.clj: *:java-source-paths* ["src/java","/home/robbie/Git/openjdk-client/src/java.desktop"]
Hrm I got some improvement by changing java source paths to:
openjdk-client/src/java.desktop/unix/classes
openjdk-client/src/java.desktop/unix/native
openjdk-client/src/java.desktop/share/classes
Keep getting stuck on this:
src/java/XForeignComponentPeer.java:1162: error: cannot find symbol
protected boolean isEventDisabled(XEvent e) {
^
symbol: class XEvent
location: class XForeignComponentPeer
Here's an attempt to separate out just the Java parts https://github.com/robbieh/AWTForeignXWindow/