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

Fix for #3666 #4763

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

Fix for #3666 #4763

wants to merge 2 commits into from

Conversation

mmattes
Copy link

@mmattes mmattes commented Jul 22, 2018

According to https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472531472

_NET_WM_STATE_FULLSCREEN indicates that the window should fill the entire screen and have no window decorations. Additionally the Window Manager is responsible for restoring the original geometry after a switch from fullscreen back to normal window.

I think that the cinnamon desktop handles this and that the additional move to position 0, 0 causes issues here. Not moving the window after the event is send fixes this issue in cinnamon. I additionally tested the change in XFCE and Mate and it seems to work without any problems.

@freerdp-bot
Copy link

Can one of the admins verify this patch?

@akallabeth
Copy link
Member

@freerdp-bot test

@freerdp-bot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://ci.freerdp.com//job/PullRequestTester/2990/

Copy link
Member

@akallabeth akallabeth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, broken on all accounts (cinnamon fedora 28)
The window is not restored to its previous position after applying your patch.
On multimonitor setups it even restores on the wrong monitor.

@mmattes
Copy link
Author

mmattes commented Jul 30, 2018

The window is not restored to its previous position after applying your patch.
On multimonitor setups it even restores on the wrong monitor.

Hm... on the website i referenced it says that the window manager is responsible for restoring the window to its previous state. So isnt your discovery then a bug within cinnamon which FreeRDP should not aim to fix?

The only other solution I could think of is to add some sleep time before moving the window, i can give that a try this afternoon.

@akallabeth
Copy link
Member

@mmattes It might indeed be a bug in window managers (or disagreement, pick your poison ;)), sadly they all misbehave (the ones I tried at least). This way the behaviour is at least somewhat the one expected.

Anyway, the referenced issue with the transparent/frozen window seems to be of a different nature, as the window may be moved by code at any time without the wm to do block something, so this fix is just hiding what is causing the issue anyway.

Have you checked we are not in some kind of recursive loop through X11 event generation in an X11 event handler? That might be the actual cause of the issue and be fixable without manipulating fullscreen switch behaviour.

@mmattes
Copy link
Author

mmattes commented Jul 30, 2018

I haven't had a look for an recursive event loop yet, will have a look later. What I can say so far is that it would work if the window is moved to x = 1 and y = 0. Rather then x = 0 and y = 0.

@akallabeth
Copy link
Member

@mmattes Ah, ok. Might simply be an issue if we don't actually move the window then?

@mmattes
Copy link
Author

mmattes commented Jul 30, 2018

@akallabeth this is, after a lot of trying and reading the only solution i could come up with. It keeps the old behavior and fixes the issue with Cinnamon WM.

Please note that toggling full-screen back and forth many times will slowly move the window down as XMoveWindow moves the position of the window including decorator (green mark blow) but the ConfigureNotify event gives the top/left position of the window without decorator (red mark below). I haven't found anything which tells me how large the decorator is so i left this behavior as it is.

image

@akallabeth
Copy link
Member

@mmattes played a bit and found (again) issues with the fullscreen stuff.
Could you try https://github.com/akallabeth/FreeRDP/tree/fullscreen_cinnamon and report if it works for you?
Should fullscreen and restore on the correct monitor now (using cinnamon here on fedora 28)

@mmattes
Copy link
Author

mmattes commented Jul 31, 2018

@akallabeth
xfreerdp /u:username /f /v:hostname works
xfreerdp /u:username /smart-sizing /v:hostname works
xfreerdp /u:username /dynamic-resolution /v:hostname works
xfreerdp /u:username /v:hostname does not work, decorators are just removed and that is it, window stays at original place and keeps size. May nothing should happen at all here?

@mmattes
Copy link
Author

mmattes commented Oct 23, 2018

@akallabeth anything i can do to get this pushed forward to get a solution?

@akallabeth
Copy link
Member

@mmattes trial and error so far, have not found something that works better in all cases

@dannymcc
Copy link

@mmattes Hi, did you ever have any luck with this? We are using FreeRDP to access software from VetZ and seem to be struggling with windows resizing crashing the session. Did you ever make any further progress?

@Neustradamus
Copy link

Have you progressed on it?

@akallabeth
Copy link
Member

is this issue still relevant?
Is this still an issue with HIGH DEF rails support?

@mmattes
Copy link
Author

mmattes commented Aug 2, 2023

@akallabeth i will test it and will let you know. Could you pleased give ne some insight what HIGH DEF rails Support means?

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.

None yet

5 participants