Best way to determine user's screensize?

Peter J. Holzer hjp-python at hjp.at
Sat Oct 31 15:19:59 EDT 2020


On 2020-10-31 11:52:31 -0700, Ethan Furman wrote:
> On 10/31/20 11:24 AM, Peter J. Holzer wrote:
> > On 2020-10-31 11:58:41 -0500, 2QdxY4RzWzUUiLuE at potatochowder.com wrote:
> > > I don't think we're disagreeing too much here, either.  IMO, the user
> > > should be in control, whether by config file or command line or
> > > whatever,
> > 
> > Config files and command lines are inputs to the application. The
> > programmer has to decide what options to accept, what they mean and how
> > to process them. As far as this discussion is concerned, they are
> > strictly part of the application.
> 
> I'm not sure which of the above two snippets I'm (dis)agreeing with, but if
> the user has specified in the config file that they want "full screen", how
> does the application tell the layout manager that?

It doesn't directly. It tells the window manager that it wants to go
full screen. The window manager resizes the window, which causes a
resize event to be sent to the application. The application then asks
the layout manager to recompute the layout based on the new window size
(the latter will probably be managed automatically by the framework, so
the programmer doesn't have to write code for that, but it's still part
of the application).

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp at hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mail.python.org/pipermail/python-list/attachments/20201031/cdb58632/attachment.sig>


More information about the Python-list mailing list