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

No SetWindowShapeRegion in XFixes #200

Open
Heath123 opened this issue Feb 20, 2021 · 4 comments
Open

No SetWindowShapeRegion in XFixes #200

Heath123 opened this issue Feb 20, 2021 · 4 comments

Comments

@Heath123
Copy link

I'm trying to do https://stackoverflow.com/questions/16400937/click-through-transparent-xlib-windows?rq=1 in nodejs, but the SetWindowShapeRegion function doesn't seem to exist in https://github.com/sidorares/node-x11/blob/master/lib/ext/fixes.js (seems similar to #184)

@Heath123
Copy link
Author

I'll see if I can add it maybe

@Heath123
Copy link
Author

I tried doing

ext.SetWindowShapeRegion = function(wid, destKind, xOffset, yOffset, region) {
    X.seq_num ++;
    X.pack_stream.pack('CCSLCxxxssL', [ ext.majorOpcode, 21, 5, wid, destKind, xOffset, yOffset, region ])
    X.pack_stream.flush();
}

(not sure if that's right) and

const regionID = X.AllocID()
fixes.CreateRegion(regionID, [{ width: 0, height: 0, x: 0, y: 0 }])
console.log('regionID', regionID)

fixes.SetWindowShapeRegion(wid, 0, 0, 0, regionID) // TODO: what should destKind be?

with different numbers for the second argument but I still can't click through

@Heath123
Copy link
Author

https://root.cern.ch/doc/master/shapeconst_8h_source.html#l00048
So apparently ShapeInput = 2?
This code:

const regionID = X.AllocID()
fixes.CreateRegion(regionID, [{ width: 0, height: 0, x: 0, y: 0 }])
console.log('regionID', regionID)

fixes.SetWindowShapeRegion(wid, 2, 0, 0, regionID)

fixes.DestroyRegion(regionID)

still won't work, no errors but I can't click through

@Heath123
Copy link
Author

Heath123 commented Feb 20, 2021

Well this seems useful
https://stackoverflow.com/a/35929697/4012708
Edit: But I don't know how to draw on the overlay window

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant