wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

Wayfire wlr_virtual_pointer_v1_new_pointer_event ignores suggested seat and output

Open kode54 opened this issue 4 years ago • 3 comments

Describe the bug Wayfire's new virtual pointer event handler ignores the suggested seat and output parameters completely, which breaks single output pointer constraints by anyvnc.

https://github.com/any1/wayvnc/blob/master/src/main.c#L985-L987

To Reproduce Steps to reproduce the behavior:

  1. Start Wayfire with multiple outputs.
  2. Start anyvnc on one of those outputs.
  3. Cursor is spread across all outputs.

Expected behavior Cursor is constrained to the suggested output, or even just seat.

Wayfire version git: e83f1f6fb271911e74a404784a8699d45a525095

Notes There are two messages for creating a new virtual pointer, one which can specify the seat it belongs to, and an extended function that can also specify the output it should belong to. AnyVNC uses the latter to constrain the client cursor to the requested output to be remoted into. Currently Wayfire ignores both of these hint variables and just treats all virtual pointers as a full surface space according to all active outputs.

Related issues https://github.com/any1/wayvnc/issues/64

kode54 avatar Sep 13 '21 00:09 kode54

It appears Sway does listen to these members. It maps the input to the given wlr seat if a seat is specified. Output handling appears to be rather simple to handle, too, it just uses wlr_cursor_map_input_to_output to handle that part.

kode54 avatar Sep 13 '21 00:09 kode54

i've been using wayfire for past 6 months and just installed wayvnc and still see this same issue you are describing.

i dont see any response here on this issue from wayfire. have you just moved on to sway? or maybe some other workaround you discovered?

mrsteve0924 avatar Oct 28 '23 18:10 mrsteve0924

I've moved desktops multiple times, and back to Wayfire again. This appears to still be a problem.

kode54 avatar Oct 28 '23 21:10 kode54

As a newbie trying to figure his way through the Linux landscape and start getting his feet wet with RPIs, it's frustrating to see an issue like this be left in this state for so long.

I set up Bookworm and wrestled through getting a kiosk mode running, only to be stumped by why the mouse movements on a VNC connection are inverted. In this current state, it is ridiculously, if not impossible, to remote in and do anything with the Pi.

Researching solutions for this for a guy with my experience level is like hunting in a dark room with a tea light whilst getting battered in a hurricane. Everything is outdated, doesn't work or doesn't apply.

It's no wonder why the Linux community hasn't taken over the desktop space from MS. With all its quirks and PIA issues, Windows still works.

/end rant

quadcom avatar Aug 11 '24 20:08 quadcom

@quadcom Have you tried mapping the input device to the output as described in the wiki?

soreau avatar Aug 11 '24 21:08 soreau

@quadcom Have you tried mapping the input device to the output as described in the wiki?

I haven't the foggiest idea how that would be achieved when the problem is when using VNC to remote into the desktop of the pi. Would the input device be the system mouse? if that's the case, why is it that it works fine when a physical mouse is connected but is inverted when connecting via VNC? How would I find the name of the input if it would be identified differently when using VNC?

There are a lot of questions that need to be answered, which is difficult, especially when you have no idea which questions to ask.

Any suggestions are appreciated.

quadcom avatar Aug 11 '24 23:08 quadcom

Basically, you look at the wayfire log, which is the stdout of wayfire. If it helps at all, you can run wayfire inside of wayfire, or another wayland compositor. In the log, you should be able to see the name of the inputs and outputs. You will want to start wayvnc and connect with a client so the input devices show in the log.

EDIT: You also need to run wayfire with the -d option.

soreau avatar Aug 11 '24 23:08 soreau

I understand that you are new to all of this, so if you would like to have better support, please join us on #wayfire on libera IRC, matrix or discord. This will also help keep this thread less cluttered.

soreau avatar Aug 11 '24 23:08 soreau

Have you tried mapping the input device to the output as described in the wiki?

This worked to get my mouse working correctly with wayvnc. thanks for the tip @soreau [input-device:wlr_virtual_pointer_v1] output = DP-1

mrsteve0924 avatar Aug 12 '24 06:08 mrsteve0924

Have you tried mapping the input device to the output as described in the wiki?

This worked to get my mouse working correctly with wayvnc. thanks for the tip @soreau [input-device:wlr_virtual_pointer_v1] output = DP-1

You, my sir, are a live saver!

quadcom avatar Aug 12 '24 15:08 quadcom

now we just need wayvnc to support dual monitors.

mrsteve0924 avatar Aug 12 '24 16:08 mrsteve0924

now we just need wayvnc to support dual monitors.

You should be able to run a wayvnc instance per output, at least.

soreau avatar Aug 12 '24 17:08 soreau