Best way to determine user's screensize?

songbird songbird at anthive.com
Mon Nov 2 17:38:28 EST 2020


Grant Edwards wrote:
> On 2020-11-01, songbird <songbird at anthive.com> wrote:
>
>> to keep a program simple i made it to open in the center.
>
> That's not simple: it actually takes _extra_ work to do that.

  this was the first python3 program i wrote, i certainly
do not know python3 or desktop application standards or
much of the other stuff i did, but the program does work
and i'm fine with it as what it is.

  by no means is any program the final statement on any
problem - they are all iterations.  some fail, some go
further.  mayhaps, i'll get further, i can't say at the
present, mainly because my time for programming is not 
that much during the spring/summer/fall.  i'm only taking
a look at this thread because it does touch on issues i'm
curious about and i'm gradually getting more time so 
perhaps there's a chance it will get some updates and 
changes this winter.

  someone commented to me that if that is my attitude then
perhaps nobody will play it.  that's ok, i didn't write it
for anything other a learning experience.  that experience
will perhaps continue...  i may also perhaps get run over
by a mad cow tomorrow and the future will then be left for 
someone else to determine.  :)


>> if i ever get back to it i'll have to figure out how to ask
>> the windowing system what it wants to do for placement
>
> I've never heard of doing that before. I've written lots of desktop
> GUI apps in the past 30 years, and I've never written one line of code
> dealing with the location of the top-level window. I just let the
> toolkit and window manager handle it.

  if there are answers to the following questions this
would go in my file for future efforts.

  1. i'm running Debian testing, lightdm and MATE desktop.

  2. i don't know anything about how those things provide
     information to an application.  pointers would be
     appreciated.

  3. the application is written in python3, using gtk3
     and pyglet.

  it is a very rotten first attempt, i admit that.  :)
but also, for what it is it does work.  note, it does not
work on Windows because i don't have a windows machine
for development and testing nor do i have the inclination
to do that right now (which is why that's not done yet).

  i've posted links to it here before but just so anyone
doesn't have to search for it i'll put the link here too:

  https://github.com/flowerbug/ngfp

  have fun, cheers, etc.  :)


  songbird


More information about the Python-list mailing list