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

Initial PoC for wayland CSD window drag #11046

Closed
wants to merge 3 commits into from

Conversation

aki237
Copy link
Contributor

@aki237 aki237 commented Apr 26, 2024

Release Notes:

zed-wayland-move-csd.mp4

 * titlebar reuses some of the icons from the asset pack
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Apr 26, 2024
Signed-off-by: Akilan Elango <akilan1997@gmail.com>
@AngryAnt
Copy link

AngryAnt commented May 6, 2024

Is it at all possible for this to be hidden behind a (maybe default-on?) option which otherwise has Zed opt into SSD?

@mikayla-maki
Copy link
Contributor

Hello! Any update on this PR?

@mikayla-maki
Copy link
Contributor

Superseded by #11525

@mikayla-maki
Copy link
Contributor

Feel free to continue this work and tell me to open the PR back up! Closing to keep things tidy on our end :)

@sqaki
Copy link

sqaki commented May 8, 2024

Hey @mikayla-maki , sorry for the absence. Little busy from the work front. I'll try to contribute to the new PR. 😀

mikayla-maki pushed a commit that referenced this pull request May 14, 2024
Based on #11046

- Partially fixes #10346 
- Fixes #9964

## Features
Window buttons

![image](https://github.com/zed-industries/zed/assets/71973804/1b7e0504-3925-45ba-90b5-5adb55e0d739)

Window drag

![image](https://github.com/zed-industries/zed/assets/71973804/9c509a37-e5a5-484c-9f80-c722aeee4380)

Native window context menu

![image](https://github.com/zed-industries/zed/assets/71973804/048ecf52-e277-49bb-a106-91cad226fd8a)

### Limitations

- No resizing
- Wayland only (though X11 always has window decorations)

### Technical

This PR adds three APIs to gpui.

1. `show_window_menu`: Triggers the native title bar context menu.
2. `start_system_move`: Tells the compositor to start dragging the
window.
3. `should_render_window_controls`: Whether the compositor doesn't
support server side decorations.

These APIs have only been implemented for Wayland, but they should be
portable to other platforms.

Release Notes:

- N/A

---------

Co-authored-by: Akilan Elango <akilan1997@gmail.com>
osiewicz pushed a commit to RemcoSmitsDev/zed that referenced this pull request May 18, 2024
Based on zed-industries#11046

- Partially fixes zed-industries#10346 
- Fixes zed-industries#9964

## Features
Window buttons

![image](https://github.com/zed-industries/zed/assets/71973804/1b7e0504-3925-45ba-90b5-5adb55e0d739)

Window drag

![image](https://github.com/zed-industries/zed/assets/71973804/9c509a37-e5a5-484c-9f80-c722aeee4380)

Native window context menu

![image](https://github.com/zed-industries/zed/assets/71973804/048ecf52-e277-49bb-a106-91cad226fd8a)

### Limitations

- No resizing
- Wayland only (though X11 always has window decorations)

### Technical

This PR adds three APIs to gpui.

1. `show_window_menu`: Triggers the native title bar context menu.
2. `start_system_move`: Tells the compositor to start dragging the
window.
3. `should_render_window_controls`: Whether the compositor doesn't
support server side decorations.

These APIs have only been implemented for Wayland, but they should be
portable to other platforms.

Release Notes:

- N/A

---------

Co-authored-by: Akilan Elango <akilan1997@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Window decoration not being draw in wayland
5 participants