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

feature: add maximize-frame and minimize-frame command for lem sdl2 version. #1624

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

sakurawald
Copy link
Contributor

The issue: #1583

@sakurawald sakurawald changed the title feature: add maximize-frame and minimize-frame command for lem sdl2 version. feature: add maximize-frame and minimize-frame command for lem sdl2 version. Nov 20, 2024
@sakurawald
Copy link
Contributor Author

To start up lem editor and maximize it, append this to init.lisp:

(lem-sdl2/frame:maximize-frame)

@cxxxr
Copy link
Member

cxxxr commented Nov 20, 2024

That's good.
If I had to say something, I'd like to put it in the same package as toggle-frame-fullscreen and unify the interface.
I also want to make it compatible with other than SDL2.

https://github.com/lem-project/lem/pull/831/files
Wouldn't it be nice to define the interface like the PR of the link destination?

@cxxxr
Copy link
Member

cxxxr commented Nov 20, 2024

I tried it on a macos, but it seems that the process will end abnormally if you don't use sdl2:in-main-thread.

I was able to get it working on macOS by doing the following

(sdl2:in-main-thread ()
    (sdl2:maximize-window (lem-sdl2/display::display-window (lem-sdl2/display:current-display))))

@sakurawald
Copy link
Contributor Author

I tried it on a macos, but it seems that the process will end abnormally if you don't use sdl2:in-main-thread.

I was able to get it working on macOS by doing the following

(sdl2:in-main-thread ()
    (sdl2:maximize-window (lem-sdl2/display::display-window (lem-sdl2/display:current-display))))

Hah, sorry, i forget about this.
It works well in linux, i am not very sure about it in other platforms.

I have modified the source, and you can help me modify it if anything is wrong.

@cxxxr
Copy link
Member

cxxxr commented Nov 20, 2024

Thank you.
Can I merge it and then make changes?
I'll move the command definitions to lem-core/commands/frame.

@sakurawald
Copy link
Contributor Author

Thank you. Can I merge it and then make changes? I'll move the command definitions to lem-core/commands/frame.

Sure!

@cxxxr cxxxr merged commit 09cb0eb into lem-project:main Nov 20, 2024
2 checks passed
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.

2 participants