ArcticaProject / nx-libs

nx-libs
Other
119 stars 39 forks source link

Just another questions about shadow mode. #1049

Open dimbor-ru opened 2 years ago

dimbor-ru commented 2 years ago

Finally shadow sessions with freenx works fine and even window is scalable. But they are in virtual desktop sessions only. Where rootless session shadowed everything looks sad:

The lack of windows decoration is understandable, because it is implemented by the WM of the primary client. Maybe you know. Is it possible to run a shadow nxagent in rootless mode too? Like the main nxagent. This would solve a lot of problems.

I have also tried disabling shadow window scaling when resizing the main shadow window. nxagent option resize=0 has no effect.

In general, did anyone deal with rootless shadow mode?

uli42 commented 2 years ago

On Fri, Jun 17, 2022 at 12:14 AM dimbor-ru @.***> wrote:

Finally shadow sessions with freenx works fine and even window is scalable. But they are in virtual desktop sessions only. Where rootless session shadowed everything looks sad:

The lack of windows decoration is understandable, because it is implemented by the WM of the primary client. Maybe you know. Is it possible to run a shadow nxagent in rootless mode too? Like the main nxagent. This would solve a lot of problems.

I have also tried disabling shadow window scaling when resizing the main shadow window. nxagent option resize=0 has no effect.

In general, did anyone deal with rootless shadow mode?

Hmm, AFAIK shadowing works differently than normal NX mode. In shadowing mode the nxagent attaches to the shadowed X server using the Damage extension and is then informed about any regions on the screen that need to be redrawn. It then grabs those regions after they have been redrawn by the respective client and transfer the (new) content as images to the nx client side. (I have never dived into the details, though)

This given, I doubt there's any support for rootless shadowed mode. Looking at nxagent's command line parameters we have four modes, which are thought to be mutually exclusive:

-D enable desktop mode -R enable rootless mode -S enable shadow mode -B enable proxy binding mode

Uli

dimbor-ru commented 2 years ago

You have destroyed almost all my dreams. Then in my free time I'll try to at least limit the transmitted shadow area. Because usually one application with one own window is launched in a rootless session.

uli42 commented 2 years ago

You are welcome to work on rootless shadow sessions. I have checked the argument parsing and it seems that -R and -S are not mutually exclusive at this level. But I have not checked what the code is really doing when both are given. I agree that such a mode would be nice but I doubt that it will perform very well.

Uli

On Fri, Jun 17, 2022 at 11:21 PM dimbor-ru @.***> wrote:

You have destroyed almost all my dreams. Then in my free time I'll try to at least limit the transmitted shadow area. Because usually one application with one own window is launched in a rootless session.

— Reply to this email directly, view it on GitHub https://github.com/ArcticaProject/nx-libs/issues/1049#issuecomment-1159234666, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQHBZAZFQQL2ZRLHDQDJ3LVPTT55ANCNFSM5ZAGZ2LA . You are receiving this because you commented.Message ID: @.***>

dimbor-ru commented 2 years ago

Wow! -R jointly -S really worked. But they work strange too. Shadow client open two windows. First is full black and don't operate (root window for rootless?). Second named 'Unnamed' and include content same as in shadow only mode. At least it is not scaled, but cropped when resized. There is something to think about. Thanks.