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

Fix run-medley -dimensions processing to make sensible choices #217

Merged
merged 1 commit into from
Feb 28, 2021

Conversation

nbriggs
Copy link
Contributor

@nbriggs nbriggs commented Feb 28, 2021

Given a "-dimension WxH" argument, round up the W to a multiple of 32 for the
Lisp window width and use an X window geometry with an additional
22 pixels for both W and H to account for the current scrollbar size so that
the resulting X window will not require scrolling.

Given a "-dimension WxH" argument, round up the W to a multiple of 32 for the
Lisp window width and use an X window geometry with an additional
22 pixels for both W and H to account for the current scrollbar size so that
the resulting X window will not require scrolling.
Copy link
Member

@masinter masinter 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 OK but I really wish we could do more for the case where no dimensions were specified.

I've been experimenting with different algorithms. The latest is to take the screen height in actual pixels (1080 in my case), and subtract 66 (1016 in my case). That is "screen height".
66 is approximate 22 pixels for scroll-bar + window title + taskbar.
Then to get screen width, take 2^21 /height. For me, this gives the largest possible window in terms of screen real estate.
This algorithm doesn't take into account what the X server reports and the kinds of bugs to expect, though.

@blakemcbride
Copy link

I have been trying ldex without the shell script. There are three sizes:

  1. the monitor size
  2. the Medley window size
  3. the Medley window size when maximized

The -g option appears to set #2. None of the options affect #3. That's where the problem is. I understand two things:

A. As designed, maiko can only handle a maximum size of X (some number)
B. There may also be problems with the runtime system if #3 changes from one run to another

I think correcting this is a big win. While in the process, addressing the font issue and multiple color issues would fit in well.

@nbriggs
Copy link
Contributor Author

nbriggs commented Feb 28, 2021

-sc sets the size of the underlying Lisp screen, its width is rounded up from what you give it to a multiple of 32.
-g sets the size of the X window within which the Lisp screen is displayed. This includes the 22 pixels of scroll bar and borders (in both width and height)
The Lisp screen can be at most 65536*32 pixels (width*height with width rounded up to a multiple of 32) -- under that size it can be anything you set with -sc.
The Lisp screen can be changed from run to run (different -sc values) -- the system will re-layout the windows and force a redisplay. The -g can change as well, all it will do is change the amount of the Lisp screen that's visible at once.
The X window needs to fit on your physical display, but the Lisp screen could exceed your physical display size.

@nbriggs nbriggs merged commit 14415e1 into master Feb 28, 2021
@masinter masinter deleted the round-run-medley-dimensions branch March 2, 2021 01:46
@masinter masinter added the online label Feb 7, 2022
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.

3 participants