Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`wf-locker`: invalid GTK CSS color `#0000` causes background configuration to be ignored

オープン
#554 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp
領域
desktop

調査の方向性

まず WF_LOCKER_DEBUG=1 wf-locker --now で警告を再現し、次に CssFromConfigString と slowfade アニメーションの周辺にある wf-locker の CSS 生成箇所を特定します。wf-shell.ini.example を locker/background_color の設定メタデータと併せて確認します。GTK が生成された透明色を受け入れ、設定した色が表示され、例で実際のオプション名が使われていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Description

wf-locker in wf-shell 0.11 appears to generate invalid GTK CSS for its fade-in animation:

@keyframes slowfade {
    from { opacity: 0; background: #0000; }
    to   { opacity: 1; }
}

GTK rejects #0000 with:

Gtk-WARNING **: Theme parser error: <data>:1:30-31: Expected a valid color.

As a result, the locker background configured with background_color does not appear to be applied. The lock screen remains transparent/whitish regardless of the configured value.

Reproduction

With wf-locker running in debug mode:

WF_LOCKER_DEBUG=1 wf-locker --now

Configure:

[locker]
background_image = false
background_color = #ff0000

The result is still a white/whitish or transparent background rather than red.

The locker emits:

Gtk-WARNING **: Theme parser error: <data>:1:30-31: Expected a valid color.

and the generated CSS contains:

.fade-in {animation-name: slowfade;animation-duration: 3.000000s; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: forwards;}
@keyframes slowfade {
    from {opacity:0; background: #0000;}
    to {opacity:1;}
}
Additional observation

The configuration option in the implementation/metadata is named:

locker/background_color

and the source uses:

new CssFromConfigString(
    "locker/background_color",
    ".wf-locker {background-color:",
    ";}"
);

However, the shipped wf-shell.ini.example documents the option as:

background-color = #0000

rather than:

background_color = ...

So there also appears to be a typo in the example configuration.

Expected behavior

A valid background_color should be applied to the locker, e.g.:

background_color = #ff0000

should produce an opaque red background.

The fade-in animation should also use a GTK-compatible representation of transparent black, such as:

background: rgba(0, 0, 0, 0);

or another color syntax accepted by GTK CSS.

Environment
  • Fedora 44
  • Wayfire 0.11
  • wf-shell 0.11
  • GTK4
  • Reproduced with WF_LOCKER_DEBUG=1
主要言語
C++
スター
179
フォーク
56
平均マージ
2日 23時間
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

WayfireWM/wf-shell のほかの issue

WayfireWM/wf-shell の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。