Bug 234926 - KWin behaves oddly with WM_HINTS.input == false (breaks cellwriter)
Summary: KWin behaves oddly with WM_HINTS.input == false (breaks cellwriter)
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Unspecified
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 244625 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-04-20 22:50 UTC by M G Berberich
Modified: 2021-12-06 04:37 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description M G Berberich 2010-04-20 22:50:27 UTC
Version:            (using KDE 4.3.4)
Installed from:    Debian testing/unstable Packages

If kwin is runnung, cellwriter does no longer work properly. Trying to draw a multistroke character in cellwriter p.e. “H” consisting of three strokes (‘|’, ‘-’ and ‘|’) does not work when kwin is running. The input is reset for every stroke. This not only occurs with tablet-input, but also with (conventionell) mouse input.

Cellwriter works fine with twm. The problem has been confirmed on Debian GNU/Linux and gentoo Linux.
Comment 1 Christoph Feck 2010-04-20 23:00:26 UTC
Problem confirmed on openSUSE 11.2 with KDE from trunk and Qt from 4.7 branch. It used to work with KDE 3 (that I remember), and I tried with KDE 4 again. It may have to do with extended input events, as I got it working when enabling them in cellwriter (see cellwriter home page), but it did not work reliably, i.e. at one point it stops working again.
Comment 2 M G Berberich 2010-04-20 23:09:08 UTC
Yes it worked fine on KDE3.

Switching on input-events make it work until the cursor leaves the cellwriter-window. Then it's not working at all until input-events are switched off again.
Comment 3 Thomas Lübking 2010-04-21 00:09:49 UTC
it's a utility window and does not get focus ever.
try settings "left button" to only "actiate" in the actions page of kwins configuration dialog.

setting a special rule that enforces focussing (preferences, accept focus) will work around this.
Comment 4 Christoph Feck 2010-04-21 00:53:44 UTC
Thomas, cellwriter is a tool like xvkbd, so it should never get the focus. The focus should stay at the application window that the written input should receive.
Comment 5 Thomas Lübking 2010-04-21 12:28:28 UTC
ok, makes quite some sense and indeed - it sets focus acception to false, Utility type handling is ok.

interestingly, by shading the window i can _activate_ it, nevertheless the input fails. (unless forcing the focus)

---
as the input seems timer related, i vaguely suspect the usage of CurrentTime instead xTime() in events.cpp - no idea why that was changed (for pointer inputs) or if it's the culprit at all, though :-\
Comment 6 Thomas Lübking 2010-07-14 19:03:05 UTC
*** Bug 244625 has been marked as a duplicate of this bug. ***
Comment 7 Alex Merry 2010-07-14 19:38:36 UTC
Copying info from Bug 244625:

When an application sets the input flag of WM_HINTS to false (preventing the
window manager from passing focus to it), pressing a mouse button down on the
window when running under KWin sends an XLeaveWindowEvent to the window.  On
other window managers this doesn't happen (the ButtonPress event gets sent, but
not the LeaveWindow/Crossing event).

See Bug 244625 for test cases.
Comment 8 Otso Helenius 2011-06-10 16:20:45 UTC
Here is a possible workaround for cellwriter that might(?) also help solve the issue:

"I am running Kubuntu 11.04, and can confirm that launching with: 
GDK_NATIVE_WINDOWS=1 cellwriter fixed the single stroke problem for me also. Thank you so much. Is there a way to make this happen by default for cellwriter. I don't mean mine, I mean the program."

https://code.google.com/p/cellwriter/issues/detail?id=34#c11
Comment 9 Christoph Feck 2012-02-18 13:46:03 UTC
Cellwriter 1.3.5 does no longer show this issue. Not sure if it was a KWin bug, which has been worked around, or if this was a cellwriter bug.
Comment 10 Thomas Lübking 2012-02-18 14:21:26 UTC
I don't see a 1.3.5 version, but archlinux/aur has this patch from launchpad invoked:
http://launchpadlibrarian.net/18959127/cellwriter-1.3.4-cellwidget-dont-disable-xinput.diff

So it likely works because they don't disable xinput anymore.

The reason for kwin lies likely somewhere in the getWMHints() actions, no idea whether we or they behaved "incorrectly" (ie. for them on implicit expectations)
I'll check whether there's some side unwanted effect (through urgency or whatever) nevertheless.
Comment 11 Christoph Feck 2012-02-19 01:46:12 UTC
I got the 1.3.5 version from http://code.google.com/p/cellwriter/
Comment 12 Thomas Lübking 2012-02-19 17:05:47 UTC
ahh, they moved. from the sources (cellwriter.c:2043)

// Do not listen to leave_notify_event, after a certain GTK version
// it fires for just about anything you do on the screen.

I guess the fake event handling in regarding non native windows (GDK_NATIVE_WINDOWS=0) is a bit aggressive and will react to various (synthetic) configure events or even property changes (ie. kwin probably informs the client "you did not get the focus" and gtk maps that to "leave") - so we probably have to look for the rather "absurd" source of this ...
Comment 13 Martin Flöser 2016-08-29 10:31:46 UTC
is this still an issue?
Comment 14 kde.org 2021-11-06 17:36:33 UTC
This issue report is quite old. Can you please confirm, that it still persists with KDE 5.23?
Comment 15 Bug Janitor Service 2021-11-21 04:38:31 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 16 Bug Janitor Service 2021-12-06 04:37:56 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!