Application window geometry specifier

2QdxY4RzWzUUiLuE at potatochowder.com 2QdxY4RzWzUUiLuE at potatochowder.com
Wed Jan 13 23:18:14 EST 2021


On 2021-01-13 at 21:41:26 -0600,
Python <python at bladeshadow.org> wrote:

> On Thu, Jan 14, 2021 at 12:27:19PM +1100, Chris Angelico wrote:
> > On Thu, Jan 14, 2021 at 12:11 PM Python <python at bladeshadow.org> wrote:
> > >
> > > On Tue, Jan 12, 2021 at 06:43:39PM -0000, Grant Edwards wrote:
> > > > And those X11 users will swear at you if you override their window
> > > > managers configured window placement. Application code should not care
> > > > about or try to control window geometry. Period.
> > >
> > > I think this is just plain wrong.
> 
> As a side note, from a purely technical standpoint, Grant's point is
> demonstrably factually false.  A GUI application necessarily must
> "care about or try to control window geometry" so that if the user
> moves or resizes the application, enables or disables additional
> widgets, etc., the widgets it contains are redrawn such that they
> remain usable, possibly expanding the canvas they're drawn on or
> adding new GUI elements like scrollbars to ensure that (at least it
> does if it wants to be useful) ...

A GUI application must care about the geometry (to react to changes made
by the user or the window manager).

OTOH, if I (the user) request a 80x24 character terminal window with a
certain size glyph, and I get a terminal that isn't 80x24 and that glyph
size, then at least one of the application, the window manager, or some
other library is broken.  Period.  Go ahead, tell me, the *user*, that I
shouldn't do that, or that I should reconsider my use case, or that such
a request is too demanding for a modern computer system to honor.

See also Extended Window Manager Hints,¹ with the emphasis on *hints*.

> ... GUI frameworks may provide a core that automatically handles this
> for you, but that is not always the case (as an extreme example, if
> you're writing the whole app from scratch in assembly language) ...

Define "from scratch."

Why does the language in which I'm writing my application matter?

¹ https://en.wikipedia.org/wiki/Extended_Window_Manager_Hints


More information about the Python-list mailing list