linux: a fitted panel realized before its first fit keeps its options size
メンテナーはふだん 1 日以内に返信
評価
この issue はまだ評価されていません。
説明
Context
fitPanel (internal/platform/linux/panel.go, the function that applies driver.WindowFitSize to a panel) sizes the panel only with gtk_window_set_default_size. GTK honours a default size only until the window is realized. A panel that gets realized before its first fit therefore keeps its PanelOptions size instead of its content's size. The panel can be realized before its first fit by anything that needs its X11 window or calls gtk_widget_realize before the first show; reading its X11 window for stacking levels is one example.
Why it matters
A fitted panel (a popover, a tooltip-like window, a docked panel) shows at the wrong size, larger or smaller than its content, depending only on whether some code touched its native window early. The ordering dependency is invisible to the app. It surfaced as the CI timeout of TestTransparentFittedPanelKeepsItsAnchor in #2041, which called x11Window() before ShowAt.
Proposal
When the panel is already realized, fitPanel should resize the live window too (gtk_window_resize, or set the size request so GTK reallocates), not only the default size, and keep the existing placement step afterwards. Unrealized panels can keep using the default size.
Acceptance
- Under
xvfb-run, a fitted panel whose X11 window was read beforeShowAtshows at its fitted size (repro: inTestTransparentFittedPanelKeepsItsAnchor, runhost.onLoop(t, func() { p.x11Window() })beforeShowAt; today the snapshot stays at the options size, 280x240, instead of 180x80). - A fitted panel that refits while visible resizes and keeps its anchor.
- 主要言語
- Go
- スター
- 684
- フォーク
- 41
- 平均マージ
- 8時間 8分
- マージ済み PR(30日)
- 911
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nsgo-dev/nsgo のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
macos: TestInputMethodCommitAndSinkCandidates times out waiting for focus after other window tests対応中かも @houko が今日担当しました。 オープン
nsgo-dev/nsgo#2157 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
base: Radio has no LabelFunc or HintFunc, unlike Checkbox and Button対応中かも @houko が今日担当しました。 オープン
nsgo-dev/nsgo#2059 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
apple: TestWebMuteSuspendsMedia aborts the test process removing observers it never added対応中かも @oneo-me が今日担当しました。 オープン
nsgo-dev/nsgo#2053 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
nsgotest: no step clicks a tray icon, so a tray's menu and panel cannot be tested対応中かも @houko が今日担当しました。 オープン
nsgo-dev/nsgo#2051 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
peterstace/simplefeatures#726 ·
-
area: import bug go good first issue priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
fukubie/StockLlama#69 ·
-
enhancement help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
cloverworks-hq/rumpty-cli#95 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
pulseaiclub/phi#615 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信