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

Window Manager not working #151

Open
RossComputerGuy opened this issue Sep 13, 2017 · 9 comments
Open

Window Manager not working #151

RossComputerGuy opened this issue Sep 13, 2017 · 9 comments

Comments

@RossComputerGuy
Copy link
Contributor

I get this error from the window manager example:

{ Error: XRender: a value for a PICTURE argument does not name a defined PICTURE
    at ReadFixedRequest.callback (/home/spaceboyross/Documents/PeabodyWM/node_modules/x11/lib/xcore.js:465:29)
    at ReadFixedRequest.execute (/home/spaceboyross/Documents/PeabodyWM/node_modules/x11/lib/unpackstream.js:41:10)
    at UnpackStream.resume (/home/spaceboyross/Documents/PeabodyWM/node_modules/x11/lib/unpackstream.js:165:30)
    at UnpackStream.write (/home/spaceboyross/Documents/PeabodyWM/node_modules/x11/lib/unpackstream.js:102:10)
    at Socket.<anonymous> (/home/spaceboyross/Documents/PeabodyWM/node_modules/x11/lib/xcore.js:88:21)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at readableAddChunk (_stream_readable.js:178:18)
    at Socket.Readable.push (_stream_readable.js:136:10)
    at Pipe.onread (net.js:561:20)
  error: 143,
  seq: 6,
  message: 'XRender: a value for a PICTURE argument does not name a defined PICTURE',
  badParam: 377,
  minorOpcode: 8,
  majorOpcode: 139 }
@sidorares
Copy link
Owner

Is this using unmodified wm example?

@RossComputerGuy
Copy link
Contributor Author

yes

@RossComputerGuy
Copy link
Contributor Author

I've found out that ChangeWindowAttributes doesn't fully call the callback.

@sidorares
Copy link
Owner

I've found out that ChangeWindowAttributes doesn't fully call the callback.

can you give more details on this?

@RossComputerGuy
Copy link
Contributor Author

It only calls the callback WHEN an error occurs, I've never been able to have a callback execute when there is no error.

@sidorares
Copy link
Owner

afaik this is generic problem and I don't know good solution

Because of the way protocol is optimised for latency you generate id on the client, then submit request using this id most requests don't need to return anything and only return errors. There is no way to tell if /when request completed

@sidorares
Copy link
Owner

sidorares commented Sep 13, 2017

The only thing protocol guarantees is if you have request A and then request B they performed in order on server

@sidorares
Copy link
Owner

Probably callback style is bad api for this, maybe we should return EventEmitter from every request

Most requests never return anything and only get response when there is error ( CreateWindow, ChangeWindowAttributes )

Some always return data or error exactly once ( GetWindowAttributes, GetAtomName, GetProperty)

Some call callback one or more times ( ListFontsWithInfo:

This request is similar to ListFonts, but it also returns information about
each font. The information returned for each font is identical to what
QueryFont would return except that the per-character metrics are not returned.
Note that this request can generate multiple replies. With each reply,
replies-hint may provide an indication of how many more fonts will be returned.
This number is a hint only and may be larger or smaller than the number of
fonts actually returned. A zero value does not guarantee that no more fonts
will be returned. After the font replies, a reply with a zero-length name is
sent to indicate the end of the reply sequence.
)

@RossComputerGuy
Copy link
Contributor Author

An event emitter would make more sense an would be easier to implement.

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

2 participants