mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-24 12:21:34 +00:00
wayland: Implement -[WaylandServer mouselocation].
This commit is contained in:
parent
67e352b83e
commit
f8b8609e70
1 changed files with 14 additions and 1 deletions
|
@ -1483,8 +1483,21 @@ int NSToWayland(struct window *window, int ns_y)
|
||||||
|
|
||||||
- (NSPoint) mouselocation
|
- (NSPoint) mouselocation
|
||||||
{
|
{
|
||||||
|
int aScreen = -1;
|
||||||
|
struct output *output;
|
||||||
|
|
||||||
NSDebugLog(@"mouselocation");
|
NSDebugLog(@"mouselocation");
|
||||||
|
|
||||||
|
// FIXME: find a cleaner way to get the first element of a wl_list
|
||||||
|
wl_list_for_each(output, &wlconfig->output_list, link) {
|
||||||
|
aScreen = output->server_output_id;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (aScreen < 0)
|
||||||
|
// No outputs in the wl_list.
|
||||||
return NSZeroPoint;
|
return NSZeroPoint;
|
||||||
|
|
||||||
|
return [self mouseLocationOnScreen: aScreen window: NULL];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSPoint) mouseLocationOnScreen: (int)aScreen window: (int *)win
|
- (NSPoint) mouseLocationOnScreen: (int)aScreen window: (int *)win
|
||||||
|
|
Loading…
Reference in a new issue