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

Querying wlc_pointer_get_position returns 0, 0 #250

Closed
Enerccio opened this issue Apr 7, 2017 · 0 comments
Closed

Querying wlc_pointer_get_position returns 0, 0 #250

Enerccio opened this issue Apr 7, 2017 · 0 comments

Comments

@Enerccio
Copy link
Contributor

Enerccio commented Apr 7, 2017

Tested it during wlc_set_pointer_scroll_cb callback.

Test case:

#include <wlc/wlc.h>
#include <stdio.h>
#include <stdlib.h>

bool mouse_scroll(wlc_handle view, uint32_t time, const struct wlc_modifiers* mods,
		uint8_t axis_bits, double amount[2]) {
	struct wlc_point point;
	wlc_pointer_get_position(&point);
	
	printf("mouse pos %i, %i\n", point.x, point.y); 
	return false;
}


 
int main(int argc, char** argv) {
	wlc_set_pointer_scroll_cb(mouse_scroll);
	
	if (!wlc_init())
		return 1;

	wlc_run();
	return 0;
}

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