"Window" lost even though it didn't have it (Issue #22859)

60 views
Skip to first unread message

oneeyeman1

unread,
Oct 8, 2022, 8:48:51 PM10/8/22
to wx-...@googlegroups.com, Subscribed

Describe the bug:
I am getting a message " "Window" lost focus even thought it never had t. And I just see it running the sample, so I decided to file this bug, because it is reproducible.

Expected vs observed behaviour:
The message shouldn't occur

To Reproduce:
Run the arttest sample.
Click Help ->About.
Observe that the console will show the message in question

  • wxWidgets version you use: 3.2.0
  • wxWidgets port wxGTK
  • OS Gentoo Linux
    igor@WaylandGnome ~/wxWidgets/buildGTK/samples/artprov $ uname -a
    Linux WaylandGnome 5.10.52-gentoo #19 SMP Tue Aug 31 09:20:30 CDT 2021 x86_64 AMD FX-9800P RADEON R7, 12 COMPUTE CORES 4C+8G AuthenticAMD GNU/Linux
  • GTK version: 3.24.29
  • Which GDK Wayland
  • Current theme: Default GNOME theme


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22859@github.com>

VZ

unread,
Oct 15, 2022, 12:41:49 PM10/15/22
to wx-...@googlegroups.com, Subscribed

I can confirm that this indeed happens under Wayland when opening a dialog from a menu event handler because gs_currentFocus == NULL but we still get a focus-out event for the menu bar.

I don't know why we don't get focus-in for it, but we just don't. If we could find out why we don't get it and fix it, this would fix this problem, but otherwise, i.e. if we can't fix the problem with the missing focus-in, we could still work around this in a few different ways, e.g.

  1. Just don't give this message if gs_currentFocus is null (and not points to another window) as this is not really a problem.
  2. Set gs_currentFocus to the menu bar before generating the menu event (this would probably be more consistent with wxMSW too).
  3. Add a handler for focus-out to the menu bar and simply do nothing in it as I don't think we really need to do anything.

@paulcor Would you have any preferences (or better ideas) here by chance?

In any case, we probably should do something here, as these messages are annoying and will affect more and more people with time.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22859/1279780303@github.com>

VZ

unread,
Nov 3, 2024, 3:53:30 PM11/3/24
to wx-...@googlegroups.com, Subscribed

Somehow I don't see this any more, even though I don't see any changes which could have fixed it neither. Can anybody still reproduce this (the sample mentioned in the issue description is presumably "artprov" and not the non-existing "arttest").


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22859/2453573453@github.com>

VZ

unread,
Nov 20, 2024, 10:53:18 AM11/20/24
to wx-...@googlegroups.com, Subscribed

Closed #22859 as not planned.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/22859/issue_event/15369352622@github.com>

VZ

unread,
Nov 20, 2024, 10:53:20 AM11/20/24
to wx-...@googlegroups.com, Subscribed

Closing because I can't reproduce it any more, neither with GNOME nor Sway.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22859/2488953723@github.com>

rexkogitans

unread,
Dec 15, 2025, 12:21:36 PM (5 days ago) Dec 15
to wx-...@googlegroups.com, Subscribed
rexkogitans left a comment (wxWidgets/wxWidgets#22859)

Just noting as this does not seem to be entirely solved in wxWidgets 3.2.9.

I am working on an application since two years, and one of my frames which I added about 1.5 years ago has this message from the very beginning:

Debug: window wxCheckBox@0x561abc9482a0 ("Trim values") lost focus even though it didn't have it

It's just a debug level message, so I assume I can safely ignore it. Also, it's only there in the debug build, but not in the release build.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22859/3656780836@github.com>

VZ

unread,
Dec 15, 2025, 12:58:12 PM (5 days ago) Dec 15
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#22859)

This message is indeed mostly harmless, but if you can reproduce it reliably in a simple example, I'd still be interested in looking at it and understanding why does it happen. Please create a new issue with the minimal example (or minimal patch to a sample) allowing to see this message if you can provide it. Thanks in advance!


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22859/3656911341@github.com>

Reply all
Reply to author
Forward
0 new messages