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

sync: merge upstream master into forked master #8

Merged
merged 95 commits into from
Sep 4, 2023
Merged

sync: merge upstream master into forked master #8

merged 95 commits into from
Sep 4, 2023

Conversation

georglauterbach
Copy link

@georglauterbach georglauterbach commented Aug 7, 2023

This PR synchronizes our master branch with Sway's official upstream master branch.

What Did I Do?

  1. Created a fork of my own from this repository
  2. Added Sway as a new upstream
  3. Merged the upstream master into my master
  4. Opened this PR

CC @SoumyaRanjanPatnaik

anpandey and others added 30 commits March 14, 2023 23:26
This makes the behavior of floating containers more consistent with i3.
The coordinates of the container are scaled when the size of the
workspace it is on changes or when the container is moved
between workspaces on different outputs.

For scratchpad containers, add a new state that preserves the dimensions
of the last output the window appeared on. This is necessary because
after a container is hidden in the scratchpad, we expect it to be in the
same relative position on the output when it reappears. We can't just
use the container's attached workspace because that workspace's
dimensions might have been changed or the workspace as a whole could
have been destroyed.
Fixes an issue where an already visible scratchpad window being moved due to
'scratchpad show' leaves the entire workspace at the top of the focus stack in
the old workspace. Moving by 'focus output' back to the old workspace would
focus the entire workspace instead of just the last active container.
Otherwise the initial bounds would be `INT_MAX` until `handle_mode` or `handle_commit` is called :)
The Wayland protocol better serves this purpose, and is supported
by more compositors.
This was introduced in the last libinput release.

Fixes the following error:

    ../sway/ipc-json.c:928:17: error: enumeration value 'LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM' not handled in switch [-Werror=switch]
      928 |                 switch (libinput_device_config_accel_get_profile(device)) {
          |                 ^~~~~~
The opaque region is set incorrectly if updated on-the-fly if switching from an opaque to a non opaque background.
This avoids us from using a bogus background_color value that
mutates as swaybar renders things and deciding opacity depending on
that.

Also remove a redundant full surface clear. Just directly write our
desired background color.
…onitor

swaywm#7524 was a partial fix. Seems like this is still an issue when
unplugging and plugging the monitor back in.

Closes: swaywm#7528
We already do this in handle_commit().
When there is no damage, no need to perform an output commit, even
when direct scan-out is used.
During direct scan-out, pass the damaged region to the wlroots
backend.
Reduces code duplication.
No need to iterate over the outputs manually.
Simple helpers to allocate and format a string.
This allows the compiler to catch mismatches between the format
string and the arguments passed in.

Need to add -Wno-format-zero-length because we pass an empty string
on purpose in swaybar/render.c.
cmd_results_new() does not take the command name as argument.
And fix the resulting build failures.
We already had a similar function in there.
This lets us easily add rendering state that we need in the future
emersion and others added 8 commits July 31, 2023 16:25
We already perform the exact same logic on transform/scale change.
With recent wlroots changes, backends which don't support output
modes can now support being disabled.

We were always marking mode-less outputs as disabled. Stop doing
that, check whether the output takes up some space in the layout
instead.
This is now unused.
Fix swaylock showing transient cursor after locked.
User-contributed scripts are being moved over to this repository:
https://github.com/OctopusET/sway-contrib
@georglauterbach
Copy link
Author

@kgilmer pinging you here to see what the current status is; not sure whether we can merge this as-is (in the sense that it doesn't break Regolith functionality), but it'd be nice to be up-to-date with upstream I guess

Regular clients are not allowed to use this interface. wlroots
already sends a protocol error if a non-Xwayland client tries to
use this interface, but let's remove all temptation by hiding it
completely.
@kgilmer
Copy link
Member

kgilmer commented Aug 25, 2023

Hi @georglauterbach , thanks for the bump. We're on the home stretch of the 3.0 release and so we'll take this up once that's out the door. Thanks!

@georglauterbach
Copy link
Author

Sounds awesome - can't wait to go v3 :D

Dudemanguy and others added 11 commits August 26, 2023 13:44
If a floating client resizes itself, sway updates several of its
internal dimensions to match but not wlr_toplevel. This means that the
next time wlroots sends a toplevel configure event, it can have wrong
coordinates that resize the client back to its old size. To fix this,
let's just use wlr_xdg_toplevel_set_size so the wlr_toplevel has the
same dimensions as sway. Fixes swaywm#5266.
This isn't the right fix for this issue because the xwayland code also
uses this function and updating the wlr_toplevel there doesn't make
sense and also causes problems. Fixes swaywm#7722.

This reverts commit bf44690.
If a floating client resizes itself, sway updates several of its
internal dimensions to match but not wlr_toplevel. This means that the
next time wlroots sends a toplevel configure event, it can have wrong
coordinates that resize the client back to its old size. To fix this,
let's just use wlr_xdg_toplevel_set_size so the wlr_toplevel has the
same dimensions as sway.

Exactly the same as 0183b9d but the
logic is onlly applied to xdg_shell and not xwayland.
@georglauterbach
Copy link
Author

I rebased onto official upstream again to catch the latest changes. All in all, I had two or thre merge conflicts that I resolved; we may want to have a look at the last commits that I had to touch.

@SoumyaRanjanPatnaik SoumyaRanjanPatnaik merged commit 504f33a into regolith-linux:master Sep 4, 2023
@SoumyaRanjanPatnaik
Copy link
Collaborator

Thanks for the PR. This will be useful when sway 1.9 is released and packaged :)

@georglauterbach georglauterbach deleted the georglauterbach/merge-upstream-master branch September 4, 2023 14:29
@kgilmer
Copy link
Member

kgilmer commented Sep 4, 2023

any reason why we shouldn't build this change into the unstable stage @SoumyaRanjanPatnaik ? Currently we're building this branch: https://github.com/regolith-linux/voulage/blob/main/stage/unstable/package-model.json#L193

@SoumyaRanjanPatnaik
Copy link
Collaborator

The master branch is in sync with v1.9-dev of sway. Ubuntu ships v1.7 of sway. Sway releases typically change the dependencies quite drastically, so it would make sense to wait till the maintainers of sway release a source package so we can steal the list of dependencies. Building v1.8 or v1.9 with the current control file doesn't work.

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.