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

implement interaction #10

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

youbitchoc
Copy link

No description provided.

Copy link
Contributor

@sevz17 sevz17 left a 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 :)

dtao.c Outdated Show resolved Hide resolved
dtao.c Outdated Show resolved Hide resolved
it's really scuffed
dtao.c Outdated Show resolved Hide resolved
dtao.c Outdated Show resolved Hide resolved
dtao.c Outdated Show resolved Hide resolved
dtao.c Outdated Show resolved Hide resolved
dtao.c Show resolved Hide resolved
dtao.c Outdated Show resolved Hide resolved
dtao.c Outdated Show resolved Hide resolved
return;
if(fork() == 0) {
setsid();
execl(shell, shell, "-c", arg, (char *)NULL);
Copy link
Contributor

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

dtao.c Outdated Show resolved Hide resolved
dtao.c Outdated Show resolved Hide resolved
dtao.c Outdated Show resolved Hide resolved
Comment on lines +411 to +422
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);
}
Copy link
Contributor

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.

Copy link
Author

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

@youbitchoc youbitchoc force-pushed the clickable branch 3 times, most recently from 170a043 to b7a63c5 Compare October 19, 2022 13:45
Comment on lines +145 to +149
struct clickable {
uint32_t x1, y1, x2, y2;
uint8_t btn;
char *cmd;
};
Copy link
Contributor

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)

Comment on lines +170 to +171
static struct clickable clickies[MAX_CLICKABLES];
static int clicky_i = 0;
Copy link
Contributor

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.

Comment on lines +407 to +411
struct input_state {
struct wl_surface *surface;
double x, y;
uint32_t button;
};
Copy link
Contributor

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)

@youbitchoc
Copy link
Author

@sevz17 just realized that I have a more updated branch at youbitchoc:interaction, I'll work on fixing these issues there?

@sevz17
Copy link
Contributor

sevz17 commented Aug 29, 2023

Yes, actually send the PR in my repo, I already started to merge PR's there.

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

Successfully merging this pull request may close these issues.

2 participants