floating / frame

System-wide Web3 for macOS, Windows and Linux
https://frame.sh
GNU General Public License v3.0
1.08k stars 150 forks source link

On re-focus of the Frame window, it forces itself to floating and snaps to right-side of screen in i3-gaps #839

Open sk33z3r opened 2 years ago

sk33z3r commented 2 years ago

System Info:

Repro:

  1. Open frame OBSERVE: By default the window is snapped to the right side of the screen, and "floating" in i3 terms (it can be dragged around the screen and not locked to a position)
  2. Change window from floating to fixed, or drag the window somewhere else
  3. De-focus the Frame window
  4. Re-focus the Frame window

Expected: Frame window remains in the last position it was in, fixed or not

Actual: Frame always returns to floating, and snaps to the right side of the screen

Video:

https://user-images.githubusercontent.com/20587571/168160991-819d6124-196f-4f06-b728-a9c6b798902c.mp4

Relevant Logs:

[758914:0512/161343.817988:ERROR:frame_sink_video_capturer_impl.cc(296)] Invalid resolutions constraints: 0x0 must not be greater than 0x0; and also within media::limits.
[758914:0512/161343.818500:ERROR:frame_sink_video_capturer_impl.cc(296)] Invalid resolutions constraints: 0x0 must not be greater than 0x0; and also within media::limits.
[758914:0512/161343.818693:ERROR:frame_sink_video_capturer_impl.cc(296)] Invalid resolutions constraints: 0x0 must not be greater than 0x0; and also within media::limits.
goosewobbler commented 2 years ago

@sk33z3r I suspect this is related to the Glide feature being enabled - this summons frame when you move the mouse to the right edge of the screen. Does it produce the expected behaviour when turned off?

honkler commented 1 year ago

Having the same issue in i3-gaps. Window goes floating on mouseover, weird graphical glitches and it'll either disappear entirely (0x0 resolution as in OP) or mess up half the workspace. Glide disabled/enabled makes no change, it still tries to float to the right edge of the screen (often the wrong screen too). If I force floating disable in i3 config it'll still go floating by itself on re-enter.

Makes the app unusable. Needs a way to entirely prevent floating.

goosewobbler commented 1 year ago

@honkler we have made some windowing changes (and will have more in the next build) in our Canary pre-release version - ask in our discord if you are interested in trying it out, would be interesting to get feedback.

honkler commented 1 year ago

I'm running this version now and it is much better. Amazing work! Couple things I'm noticing (glide/autohide both off):

goosewobbler commented 1 year ago

@honkler Thanks for the detailed feedback! We'll try to look into this before the public release.

goodvin commented 1 year ago

I have the same issue - when the mouse pointer leaves the window it switches it back to floating.

DPTJKKVH commented 1 year ago

Hey everyone. In case someone is as frustrated as me with the Frame window always snapping to the right: I have "fixed it", though in a very crude way because I'm a noob. You can find more details and the code diff here: https://github.com/floating/frame/issues/1453#issuecomment-1459054883

Even a noob can see from the diff that I didn't add any malicious code. So if you are desperate for a fix, you can just download my repo and compile the code. I will merge upstream changes until the Frame team properly fixes this bug.

goosewobbler commented 1 year ago

Hi @DPTJKKVH, thanks for the attempt at fixing this. The windowing management is very sensitive so we will need to test any changes in this area thoroughly across all the platforms we support. If you want us to take a look at this code with a view to integrating it you could submit a PR with your changes, you will need to remove the commented out code.

DPTJKKVH commented 1 year ago

Hi @goosewobbler, thanks for reaching out. This is just a small hack/workaround for people who need this fixed asap.

I can somewhat read and manipulate existing JavaScript/TypeScript but that's it. I couldn't even write you a working hello world from scratch. I could brute force myself towards the exact combination necessary to stop the (main) Frame window from snapping to the right on re-focus. It's either glide and/or some forced window position. Though you would have to actually fix the bug, as in not breaking feature A to fix bug B.

Please forgive my ignorance if this is a preposterous proposition. I mean no disrespect. I'm simply a noob trying to help. I'm fine with maintaining my dirty little fork for the foreseeable future, if necessary.

goosewobbler commented 1 year ago

Ok @DPTJKKVH, thanks for clarifying - I would say that the current right hand side docking of Frame isn't a bug but a conscious decision to limit the options available whilst we work on a more complex set of options around windowing behaviour. The issues this docking restriction has with i3-gaps and other windowing managers are simply a consequence of this intentional limitation. We are going to address this soon with the ability to switch between left / right docking and a free-floating window. The former should be relatively easy to implement, the latter has a lot of different edge cases and surrounding considerations so may take a bit longer.