A window centred before it is mapped can end up off the display, and only a size-event race puts it back
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
Direção de pesquisa
Read src/wxgui/ewxClasses/ewxWindowUtils.C, especially outsideDisplay() and keepOnDisplay(), then trace ewxFrame::Show() and its deferred call behavior. Check how maximized, full-screen, tiled, restored-geometry, and Builder AUI windows are handled before applying the deferred adjustment. Done means windows that grow when mapped stay on display without disturbing those deliberately positioned states; the issue calls for a separate round of checking.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
A top-level window that is centred and fitted while it still has its pre-map size, but takes a larger size from its sizer's minimum when GTK maps it, is positioned for the smaller size and can then hang below the display.
What normally rescues it is the wxEVT_SIZE watcher in src/wxgui/ewxClasses/ewxWindowUtils.C (watch()), which re-fits after the map. That is a race: on one Xvfb the watcher won every run, on two other machines it lost every run. Gating the watcher off reproduces the losing case exactly, which is how it was confirmed.
Seen in the Calculation Editor: CalcEdMessages::showEditor() centres at the pre-map height (528, giving y=120), Show() fits at that height, GTK then allocates 613 at map time, and 120 + 613 + 36 (TITLE_RESERVE) = 769 on a 768-pixel display. Fixed there by clamping once more from CallAfter after Show().
The general case is not fixed. Any app that is centred before map and grows at map has the same race. The shared fix would be a deferred keepOnDisplay() in ewxFrame::Show(), but keepOnDisplay() (ewxWindowUtils.C:~940) has none of the guards outsideDisplay() (:781) has -- it does not check maximized, full-screen or tiled state -- so calling it unguarded for every frame would also reach windows other apps position deliberately (restored geometry, the Builder's AUI frame). The honest version is to guard keepOnDisplay() as outsideDisplay() is guarded, then call it deferred from ewxFrame::Show().
Worth doing as one change rather than per app, but it is a behaviour change for every window, so it wants its own round of checking rather than riding along with a release.
- Linguagem predominante
- C
- Estrelas
- 10
- Forks
- 8
- Merge médio
- 6h 32min
- PRs com merge (30d)
- 1
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de FriendsofECCE/ECCE
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
FriendsofECCE/ECCE#1358 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
FriendsofECCE/ECCE#1353 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
FriendsofECCE/ECCE#1348 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
FriendsofECCE/ECCE#1347 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
FriendsofECCE/ECCE#1345 ·
Todas as issues de FriendsofECCE/ECCE
Issues semelhantes
-
documentation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Life-Framework/Life-Framework#5378 ·
Mantenedores costumam responder em até 1 dia
-
Bug Status: Needs Triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
bug status: planned ui
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
ChupathingyCE/chupathingyce#2126 ·
Mantenedores costumam responder em até 1 dia
-
good first issue simulation
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 92/100
MarcosAsh/Lattice_Fluid_Dynamics#270 ·
Mantenedores costumam responder em até 1 dia
-
needs-kind
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
falcosecurity/libs#3173 · 1 comentário ·
Mantenedores costumam responder em até 1 dia