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

Set monitor default geometry on Linux #398

Merged
merged 2 commits into from Apr 28, 2023
Merged

Conversation

jwerle
Copy link
Member

@jwerle jwerle commented Apr 28, 2023

@jwerle jwerle added bug Something isn't working linux An issue, task, or pull request related to linux labels Apr 28, 2023
@jwerle jwerle self-assigned this Apr 28, 2023
src/window/linux.cc Outdated Show resolved Hide resolved
Comment on lines +7 to +8
#define DEFAULT_MONITOR_WIDTH 720
#define DEFAULT_MONITOR_HEIGHT 364
Copy link
Member

Choose a reason for hiding this comment

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

actually we should take these values from windowManager's options.default{Width|height}

Copy link
Member Author

Choose a reason for hiding this comment

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

That won't work if [window] height = 50% is set

Copy link
Member

Choose a reason for hiding this comment

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

What was the issue with percents? I don't remember. all values should be in pixels in the end

Copy link
Member Author

Choose a reason for hiding this comment

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

String defaultWidth = app.appData["window_width"].size() > 0 ? app.appData["window_width"] : "100%";

We also don't have access to the WindowManager in the Window class.

@lamiazar
Copy link
Member

Screenshot from 2023-04-28 13-06-40

Copy link
Member

@lamiazar lamiazar left a comment

Choose a reason for hiding this comment

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

This is now working-I was running the wrong command from the local checkout

@jwerle jwerle merged commit b35cb82 into master Apr 28, 2023
6 of 8 checks passed
@jwerle jwerle deleted the linux-monitor-defaults branch April 28, 2023 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linux An issue, task, or pull request related to linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants