-
Notifications
You must be signed in to change notification settings - Fork 5
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 interaction #10
base: main
Are you sure you want to change the base?
Conversation
7129a0b
to
0807301
Compare
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.
Well, I don't have write access to this repo but this is a start :)
it's really scuffed
0807301
to
57da6eb
Compare
return; | ||
if(fork() == 0) { | ||
setsid(); | ||
execl(shell, shell, "-c", arg, (char *)NULL); |
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.
I haven't read the dzen's docs but maybe hardcoding "/bin/sh" is better
wl_pointer_enter(void *data, struct wl_pointer *wl_pointer, | ||
uint32_t serial, struct wl_surface *surface, | ||
wl_fixed_t surface_x, wl_fixed_t surface_y) | ||
{ | ||
struct input_state *istate = data; | ||
istate->surface = surface; | ||
istate->x = wl_fixed_to_double(surface_x); | ||
istate->y = wl_fixed_to_double(surface_y); | ||
} |
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.
I re-read the protocol, and it says:
When a seat's focus enters a surface, the pointer image
is undefined and a client should respond to this event by setting
an appropriate pointer image with the set_cursor request.
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.
I think that's better suited for a separate pr
170a043
to
b7a63c5
Compare
struct clickable { | ||
uint32_t x1, y1, x2, y2; | ||
uint8_t btn; | ||
char *cmd; | ||
}; |
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.
Please move this after the enum (L38)
static struct clickable clickies[MAX_CLICKABLES]; | ||
static int clicky_i = 0; |
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.
Please move this with the rest of global variables.
struct input_state { | ||
struct wl_surface *surface; | ||
double x, y; | ||
uint32_t button; | ||
}; |
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.
Also move this after the enum, (sort alphabetically)
@sevz17 just realized that I have a more updated branch at youbitchoc:interaction, I'll work on fixing these issues there? |
Yes, actually send the PR in my repo, I already started to merge PR's there. |
No description provided.