godotengine / godotengine/godot

`AcceptDialog` emits `canceled` even when invisible

Open
#110,381 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

discussion topic:gui
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

Tested versions
  • Reproducible in 4.5.rc1
System information

Godot v4.5.rc1 - Windows 11 (build 26100) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 (NVIDIA; 32.0.15.6094) - 13th Gen Intel(R) Core(TM) i5-13500 (20 threads) - 31.78 GiB memory

Issue description

AcceptDialog emits canceled when propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST) is called, even if the dialog is not visible. This brings unintended side effects to the propagation of that notification.

Steps to reproduce
  1. Connect the canceled signal of an AcceptDialog to any method
  2. Set the AcceptDialog to invisible
  3. Call propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST)
Minimal reproduction project (MRP)

canceled_mrp.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with AcceptDialog handling of NOTIFICATION_WM_CLOSE_REQUEST and reproduce the behavior using canceled_mrp.zip. Verify that propagating the notification while the dialog is invisible no longer emits canceled, while visible-dialog behavior remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, godot
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.