Review Request 116787: Always create NETEventFilter (a QWidget subclass) in the main application thread
Martin Gräßlin
mgraesslin at kde.org
Wed Mar 19 14:08:40 UTC 2014
> On March 17, 2014, 9:33 p.m., Thomas Lübking wrote:
> > src/kwindowsystem_x11.cpp, line 102
> > <https://git.reviewboard.kde.org/r/116787/diff/5/?file=254570#file254570line102>
> >
> > Is this compensated anywhere?
> > Is it actually an issue (since the constructor should operate in the GUI thread)?
>
> Aaron J. Seigo wrote:
> I commented this out to see if it resulted in any difference in function with Qt5; I didn't notice any difference, but did mean to comment it back in as I did not do a full examination of the code behind the scenes. I've put this line back in here locally.
>
> Martin Gräßlin wrote:
> I'm pretty sure it's not needed. We get the root window without having called qApp->desktop(). Quite sure about it, because I migrated QX11Info::appRootWindow() away from doing exactly what this line of code was doing.
>
> Aaron J. Seigo wrote:
> Ah, great. When I tested without that line, everything seemed to work exactly as expected. I just didn't have time to delve into the code further to confirm the anecdotal evidence ;)
>
> So... can I push? :)
yes, looks good to me. Just remove the commented line (I assume you have already done so, given that you resolved the issue).
- Martin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116787/#review53254
-----------------------------------------------------------
On March 17, 2014, 10:09 a.m., Aaron J. Seigo wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116787/
> -----------------------------------------------------------
>
> (Updated March 17, 2014, 10:09 a.m.)
>
>
> Review request for KDE Frameworks, kwin and Martin Gräßlin.
>
>
> Repository: kwindowsystem
>
>
> Description
> -------
>
> When using KWindowInfo from a thread other than the main application thread, the application fails on an assert triggered by creating a QWidget in another thread. This is due to NETEventFilter being a QWidget. This patch addresses the issue by using a QObject to create the NETEventFilter, which is itself first moved to the main application thread.
>
>
> Diffs
> -----
>
> autotests/CMakeLists.txt 073b6dd
> autotests/kwindowsystem_threadtest.cpp PRE-CREATION
> src/kwindowsystem.cpp 4c17baa
> src/kwindowsystem_p_x11.h 75f3028
> src/kwindowsystem_x11.cpp 95c396b
>
> Diff: https://git.reviewboard.kde.org/r/116787/diff/
>
>
> Testing
> -------
>
> Used in the Sprinter Windows plugin and works lovely to find desktops, windows, etc.
>
>
> Thanks,
>
> Aaron J. Seigo
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140319/fa217267/attachment.html>
More information about the Kde-frameworks-devel
mailing list