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

Refactor seat operations to use an interface #3402

Merged
merged 1 commit into from
Jan 14, 2019

Conversation

RyanDwyer
Copy link
Member

This splits each seat operation (drag/move tiling/floating etc) into a separate file and introduces a struct sway_seatop_impl to abstract the operation. This removes a heap of code from cursor.c and seat.c, and removes a bunch of multi-purpose properties from the seat struct.

The move_tiling_threshold operation has been merged into move_tiling.

The main logic for each operation is untouched aside from variable renames.

The following previously-static functions have been made public:

  • node_at_coords
  • container_raise_floating
  • render_rect
  • premultiply_alpha
  • scale_box

Everything seems to work correctly, but I've only tested it hastily. Please test thoroughly.

This splits each seat operation (drag/move tiling/floating etc) into a
separate file and introduces a struct sway_seatop_impl to abstract the
operation.

The move_tiling_threshold operation has been merged into move_tiling.

The main logic for each operation is untouched aside from variable
renames.

The following previously-static functions have been made public:
* node_at_coords
* container_raise_floating
* render_rect
* premultiply_alpha
* scale_box
Copy link
Member

@RedSoxFan RedSoxFan left a comment

Choose a reason for hiding this comment

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

Code LGTM and it appears to be working

@emersion emersion self-requested a review January 10, 2019 17:26
@RyanDwyer
Copy link
Member Author

Bump.

@ddevault
Copy link
Contributor

Thanks!

@ddevault ddevault merged commit 23ab56b into swaywm:master Jan 14, 2019
@RyanDwyer RyanDwyer deleted the refactor-seatops branch January 14, 2019 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants