Input Method OSD appears on window focus changes because tooltip-derived label changes

Abierto
#4,475 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Área
desktop

Línea de trabajo

Read Services/Fcitx5Service.qml and Modules/OSD/InputMethodOSD.qml to trace how the current input method label triggers the OSD; the report says LabelOSD.autoShowOnLabelChange is also relevant on master. Start by checking which stable fcitx5 identity is available independently of the tray tooltip. Done means focus changes with the same selected input method do not show the OSD, while actual input method changes still do.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Compositor

Niri

Distribution

NixOS

Select your Installation Method

Distro packaging

Was this your original Installation method?

Yes

dms doctor -vC
Click to expand
## DMS Doctor Report

**System**
- [ok] Operating System: NixOS 26.11 (Zokor)
  - Supported for runtime (install via NixOS module or Flake)
- [ok] Architecture: amd64
- [ok] Display Server: Wayland
  - WAYLAND_DISPLAY=wayland-1

**Versions**
- [ok] DMS CLI: dms v2.1.2
  - /nix/store/mx34a1ikhb573xry6jply613rwmwk49w-dux-shell-2.1.2/bin/.dms-wrapped
- [ok] Quickshell: Quickshell 0.3.2 (revision tag-v0.3.2, distributed by Nixpkgs)
  - /run/current-system/sw/bin/qs
- [ok] DMS Shell: v2.1.2
  - /run/user/1000/dms-shell/7c4ffac7434e05c7

**Installation**
- [ok] DMS Configuration: Found
  - /run/user/1000/dms-shell/7c4ffac7434e05c7
- [ok] shell.qml: Present
  - /run/user/1000/dms-shell/7c4ffac7434e05c7/shell.qml
- [info] Install Type: Unknown
  - /run/user/1000/dms-shell/7c4ffac7434e05c7

**Compositor**
- [ok] niri: 26.04
  - /run/current-system/sw/bin/niri
- [info] Active: niri
- [ok] Background Blur: Supported
  - Compositor supports ext-background-effect-v1

**Quickshell Features**
- [ok] Polkit: Available
  - Authentication prompts
- [ok] IdleMonitor: Available
  - Idle detection
- [ok] IdleInhibitor: Available
  - Prevent idle/sleep
- [ok] ShortcutInhibitor: Available
  - Allow shortcut management (niri)
- [ok] BackgroundBlur: Available
  - Background blur API support in Quickshell

**Optional Features**
- [ok] accountsservice: Available
  - User accounts
- [ok] power-profiles-daemon: Available
  - Power profile management
- [ok] logind: Available
  - Session management
- [warn] cups-pk-helper: Not available (install cups-pk-helper)
  - Printer management
- [info] I2C/DDC: No monitors detected
  - External monitor brightness control
- [ok] qt6-imageformats: Installed (3 formats)
  - Formats: WebP, TIFF, ICNS (/nix/store/3r2wd4pkh5x1ljvw1f7ym2wc5zgcda8f-qtimageformats-6.12.0/lib/qt-6/plugins/imageformats)
- [ok] kimageformats: Installed (4 formats)
  - Formats: AVIF, HEIF, JXL, EXR (/nix/store/lx6frcf7zg1bgz37qf1kdh5xk6d653bl-kimageformats-6.32.0/lib/qt-6/plugins/imageformats)
- [ok] Terminal: kitty
- [ok] Network: NetworkManager
  - NetworkManager present. Using NM API.
- [ok] matugen: Installed
  - Dynamic theming
- [ok] cava: Installed
  - Audio visualizer
- [ok] khal: Installed
  - Calendar events
- [info] dux-search: Not installed
  - File search
- [info] dux-calendar: Not installed
  - Calendar app
- [info] dux-files: Not installed
  - File manager
- [info] fprintd: Not installed
  - Fingerprint auth
- [info] adw-gtk3: Not installed
  - GTK3 dynamic theming; without it the global CSS override applies

**Config Files**
- [ok] settings.json: Present
  - /home/pipo/.config/dms/settings.json
- [ok] clsettings.json: Present
  - /home/pipo/.config/dms/clsettings.json
- [ok] plugin_settings.json: Present
  - /home/pipo/.config/dms/plugin_settings.json
- [ok] session.json: Present
  - /home/pipo/.local/state/dms/session.json
- [ok] dms-colors.json: Present
  - /home/pipo/.cache/dms/dms-colors.json

**Services**
- [ok] dms.service: enabled, active
- [ok] greetd: enabled
- [ok] xdg-desktop-portal: Settings portal reachable

**Environment**
- [info] QT_QPA_PLATFORMTHEME: Not set
- [info] QT_QPA_PLATFORMTHEME_QT6: Not set
- [info] QS_ICON_THEME: Not set
- [info] XDG_MENU_PREFIX: Not set

**Fonts**
- [ok] Normal Font: Geist
  - Available via fontconfig
- [ok] Monospace Font: MonoLisaFreezed Nerd Font
  - Available via fontconfig
- [ok] Display Font: DM Serif Display
  - /run/user/1000/dms-shell/7c4ffac7434e05c7/DCommon/assets/fonts/dm-serif-display/DMSerifDisplay-Regular.ttf

---
**Summary:** 0 error(s), 1 warning(s), 36 ok
Description

With osdInputMethodEnabled enabled, the input-method OSD appears on window focus changes even though fcitx5 stays on the same input method. In my case it repeatedly shows English (US) while switching windows.

This appears to be caused by deriving the OSD trigger from the fcitx5 tray tooltip display label instead of a stable input-method identity. During focus changes, the tray tooltip can transiently change/disappear/refresh. Fcitx5Service.currentIMLabel then changes between the friendly tooltip text and the raw IM name, and InputMethodOSD treats that as an input-method switch.

Relevant v2.1.2 flow:

// Services/Fcitx5Service.qml
readonly property string currentIMLabel: displayName(fcitxItem ? fcitxItem.tooltipTitle : "", currentIM)

// Empty/missing tooltip falls back to currentIM; non-empty tooltip uses tooltip-derived text
// Modules/OSD/InputMethodOSD.qml
onCurrentIMChanged: observeIM()

function observeIM() {
    ...
    if (lastIM === currentIM)
        return;
    lastIM = currentIM;
    if (SettingsData.osdInputMethodEnabled)
        show();
}

Current master keeps the same general behavior: Fcitx5Service.currentIMLabel is tooltip-derived, and LabelOSD.autoShowOnLabelChange shows whenever that label changes.

Expected Behavior

The input-method OSD should only appear when the actual selected fcitx5 input method changes, not when the tray tooltip display text temporarily changes or falls back to the raw internal name.

Steps to Reproduce
  1. Run Dux Shell 2.1.2 on niri with fcitx5 available and osdInputMethodEnabled=true.
  2. Keep the current input method as English (US).
  3. Switch focus between windows repeatedly.
  4. Observe the input-method OSD appearing even though fcitx5 did not switch IMs.

I could avoid it only by setting osdInputMethodEnabled=false; fcitx5 itself continued working normally.

Error Messages/Logs

No crash or error. This is a UI-state/event-trigger issue.

Screenshots/Recordings

The OSD shows the keyboard icon and English (US) near the bottom-right corner immediately after a window switch. I do not have a screen recording, but it happens consistently in this session.

Environment
  • Dux Shell / DMS: v2.1.2 (Stormborn)
  • Quickshell: 0.3.2
  • niri: 26.04
  • fcitx5: 5.1.22 with addons
  • NixOS package: dux-shell-2.1.2
  • Upstream master checked at b9298fe070e3f96a514c7a5e5037b3656b10be24
Lenguaje dominante
QML
Estrellas
8.4k
Forks
549
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de AvengeMedia/DankMaterialShell

Todos los issues de AvengeMedia/DankMaterialShell

Issues similares

Más issues de Desktop Dev

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.