1

I've a tkinter based project running on Raspberry pi.

It works fine except, whenever I use root.winfo_screenwidth() method, it returns 1824 instead of 1980. Same goes for height, ie, instead of returning 1080, it returns 984.

It works perfectly fine on my mac. Any idea, what am I missing here ?

dhruvvyas90
  • 1,135
  • 1
  • 15
  • 31
  • 1
    Different desktop managers might give a different screen width to a "full-screen" application because some will have window borders. A mac's desktop environment does not have window borders. – u8y7541 May 05 '17 at 14:29
  • @u8y7541: That was the only logical reason I could think of but I don't know where (or how) to look for the documentation of the same. If you can throw some references and convert it to an answer, that'd be great. Appreciate your help. – dhruvvyas90 May 05 '17 at 14:32
  • I've encountered the same issue with java applets on windows because windows has frame borders... Maybe you could try http://stackoverflow.com/questions/31085533/how-to-remove-just-the-window-border – u8y7541 May 05 '17 at 14:37
  • Interesting. Let me try out that option and get back. – dhruvvyas90 May 05 '17 at 14:45
  • 1
    might sound daft but i'm assuming you're expecting 1920x1080 because you are using a full hd screen, but on the pi you have options in `/boot/config.txt` for over/underscan, what values have you got set up for those? assuming it's a tv screen rather than a monitor the visible area is usually less than the nominal resolution. if you enable the option to disable overscan (not enabled by default) what results do you get? – James Kent May 12 '17 at 13:52

0 Answers0