-
Notifications
You must be signed in to change notification settings - Fork 974
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
get and set display name for XOpenDisplay() #34
Conversation
|
||
//Convert arg to c-string | ||
//NOTE: surely better way to go from v8::String to char* ? | ||
std::string name = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this feels pretty dirty, you know better way to accomplish?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work!
NanUtf8String name(arg[0]);
char *display_name = *name;
#include "mouse.h" | ||
#include "deadbeef_rand.h" | ||
#include "keypress.h" | ||
#include "screen.h" | ||
#include "screengrab.h" | ||
#include "MMBitmap.h" | ||
#include "xdisplay.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will probably cause errors on other OSes, right?
If I understand correctly, this allows you to pick the X server you connect to? |
Thanks that argument parsing worked nicely. I fixed up the OS compat issue, although I'm not sure I like how it structured, thought about maybe moving some of it into Yes, that’s exactly the purpose of this code; directly from X(7) under the DISPLAY NAMES section:
If your happy with the direction of this PR I can add some docs in README too? |
Sorry for the delay, I've been without internet and I want to test this first. I should be able to test tonight or tomorrow. |
0deaf78
to
3eef8cb
Compare
#206 replaces this. |
can be done by just setting DISPLAY env var, but nice if you want more control then you can now set it programmatically. ran into this problem when using ssh.