Visitar URL original
Tk window not going full screen on 90° rotated screen on mac · Issue #85521 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20230210195311/https://github.com/python/cpython/issues/85521
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

Tk window not going full screen on 90° rotated screen on mac #85521

Open
TimZ mannequin opened this issue Jul 20, 2020 · 12 comments
Open

Tk window not going full screen on 90° rotated screen on mac #85521

TimZ mannequin opened this issue Jul 20, 2020 · 12 comments

Comments

@TimZ
Copy link
Mannequin

TimZ mannequin commented Jul 20, 2020

BPO 41349
Nosy @terryjreedy, @ronaldoussoren, @ned-deily, @E-Paine

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2020-07-20.15:38:15.087>
labels = ['OS-mac', 'expert-tkinter', '3.9', '3.10', '3.8', 'type-feature']
title = 'Tk window not going full screen on 90\xc2\xb0 rotated  screen on mac'
updated_at = <Date 2020-12-15.17:05:08.746>
user = 'https://bugs.python.org/TimZ'

bugs.python.org fields:

activity = <Date 2020-12-15.17:05:08.746>
actor = 'serhiy.storchaka'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['macOS', 'Tkinter']
creation = <Date 2020-07-20.15:38:15.087>
creator = 'Tim Z'
dependencies = []
files = []
hgrepos = []
issue_num = 41349
keywords = []
message_count = 11.0
messages = ['374014', '374041', '374059', '374061', '374064', '374236', '374255', '374273', '374293', '374368', '378987']
nosy_count = 5.0
nosy_names = ['terry.reedy', 'ronaldoussoren', 'ned.deily', 'epaine', 'Tim Z']
pr_nums = []
priority = 'normal'
resolution = 'third party'
stage = None
status = 'pending'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue41349'
versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

@TimZ
Copy link
Mannequin Author

TimZ mannequin commented Jul 20, 2020

It refuses to go full screen when I rotate screen 90° on mac

@terryjreedy
Copy link
Member

On Windows, right clicking on the desktop produces a context menu with Display Settings. The dialog has an Orientation pulldown menu with the 4 choices. Without actually rotating my screen, I clicked Portrait and managed to start IDLE and click the full-screen box. It worked.

I could not find a similar option on my Macbook. Since the screen is attached to the keyboard, it would be pretty useless.

IDLE has some control over whether the full screen button appears on the window title bar, but has nothing to do with what happens when you click it. So this is almost certainly a python-on-macOS installation issue or more likely a tck/tk-on-macOS issue. (One could eliminate IDLE for sure with a minimal tkinter program creating an empty window: "import tkinter; tkinter.Tk()". If that worked, as a Text widget.

Kevin, is not maximizing in portrait mode a known issue with tk on macOS?

@TimZ
Copy link
Mannequin Author

TimZ mannequin commented Jul 21, 2020

I have 2nd screen that rotate to portrait. Is there a way to launch "import tkinter; tkinter.Tk()" at idle start? Or I better wait the next update?
It's not related but...
...why idle3.8 don't have cut/copy/paste on right click? (I mean the paste is broken when you paste-replace selected text). What's up with this one https://bugs.python.org/issue38946 ?
Is there a shortage of volunteers ? Or it's all macOS fault?

@terryjreedy
Copy link
Member

I meant to run 'import tkinter; tkinter.Tk()' directly in python, without IDLE involved, in your portrait window. Do that by running terminal in the portrait window. Then try to maximize.

Yes we need more volunteers, but bpo-38946 is an issue between macOS Catalina and tk.

@TimZ
Copy link
Mannequin Author

TimZ mannequin commented Jul 21, 2020

It works even after restart. I thought I had to run it after each restart I did it in idle only once.
So no need to do it again in python

@terryjreedy
Copy link
Member

What is 'it' in 'it works even after restart'?

@TimZ
Copy link
Mannequin Author

TimZ mannequin commented Jul 25, 2020

idle shell window
https://imgur.com/zuyuOaS

@ronaldoussoren
Copy link
Contributor

I can somewhat reproduce the problem with both IDLE and tkinter.Tk() in 3.9b3 and an external monitor.

What I did:

  • Start IDLE (or a shell running tkinter.Tk()
  • Maximize window without changing monitor settings: OK
  • Revert to regular window
  • Rotate monitor 90 degrees in the Display settings (monitor itself not rotated)
  • Maximize window again and revert back to regular size
  • Revert changes to monitor settings

When I maximise the window with a rotated display the window grows to cover most of the display, but not all of it: There is a blank area between the menu bar and the top of the window. The height of that area is about that of the titlebar of the window.

The window grows to the right size if I first rotate the screen and then start tkinter.Tk(). But then window won't go full-size when the screen is rotated back, some space is left between the righthand side of the window and the edge of the screen (again about the same amount of pixels as the height of the title bar).

Issues like this tend to be problems with the macOS port of Tk itself, I expect that to be the case in this instance as well.

System:

  • Python 3.9b3 (python.org installer)
  • macOS 10.15.6

@terryjreedy
Copy link
Member

terryjreedy commented Jul 25, 2020 •

The way to tell if _tkinter is involved or if this is purely tcl/tk issue would be for someone open a window directly with tcl/tk commands using either wish or maybe tkinter.tcl. I don't know how. I think that _tkinter involvement in maximize handling is sufficiently unlikely that I would close this as 3rd party.

@terryjreedy terryjreedy self-assigned this Jul 26, 2020
@terryjreedy terryjreedy changed the title idle not going full screen when I rotate screen 90° on mac Tk window not going full screen on 90° rotated screen on mac Jul 26, 2020
@terryjreedy terryjreedy self-assigned this Jul 26, 2020
@terryjreedy terryjreedy changed the title idle not going full screen when I rotate screen 90° on mac Tk window not going full screen on 90° rotated screen on mac Jul 26, 2020
@terryjreedy terryjreedy removed their assignment Jul 27, 2020
@terryjreedy terryjreedy removed their assignment Jul 27, 2020
@E-Paine
Copy link
Mannequin

E-Paine mannequin commented Jul 27, 2020

I am unfortunately unable to reproduce the issue (with the method provided by Ronald), but the way to create a blank window (equivalent to import tkinter; tkinter.Tk()) is simply to run wish in a terminal without giving it any commands (using exit to escape the shell after the test).

@ronaldoussoren
Copy link
Contributor

The python.org installers don't include wish, which means I cannot attempt to reproduce the issue without using tkinter.

I agree that this likely is an issue with Tk itself. Maybe keep the issue open for a bit longer to check if the upcoming Tk 8.6.11 release fixes this issue.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@ronaldoussoren
Copy link
Contributor

The issue is not present with the latest python 3.11 release on macOS 13. I haven't checked yet on macOS 10.15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants