https://bugs.kde.org/show_bug.cgi?id=421974

--- Comment #15 from Méven Car <meve...@gmail.com> ---
I do reproduce it:

Operating System: Kubuntu 21.04
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.11.0-25-generic (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 15.1 Gio of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620

After https://bugreports.qt.io/browse/QTBUG-87657 the mime type are correctly
advertised.

But I could see something suspicious in the logs:

[1675147,350]  -> wl_data_device_manager@9.create_data_source(new id
wl_data_source@31)
[1675147,497]  -> wl_data_source@31.offer("application/x-qt-image")
[1675147,512]  -> wl_data_source@31.offer("x-kde-force-image-copy")
[1675147,520]  -> wl_data_source@31.offer("image/png")
[1675147,529]  -> wl_data_source@31.offer("image/avif")
[1675147,536]  -> wl_data_source@31.offer("image/bmp")
[1675147,546]  -> wl_data_source@31.offer("image/bw")
[1675147,555]  -> wl_data_source@31.offer("image/cur")
[1675147,567]  -> wl_data_source@31.offer("image/eps")
[1675147,577]  -> wl_data_source@31.offer("image/epsf")
[1675147,586]  -> wl_data_source@31.offer("image/epsi")
[1675147,596]  -> wl_data_source@31.offer("image/icns")
[1675147,607]  -> wl_data_source@31.offer("image/ico")
[1675147,616]  -> wl_data_source@31.offer("image/jpeg")
[1675147,627]  -> wl_data_source@31.offer("image/jpg")
[1675147,639]  -> wl_data_source@31.offer("image/pbm")
[1675147,650]  -> wl_data_source@31.offer("image/pcx")
[1675147,661]  -> wl_data_source@31.offer("image/pgm")
[1675147,672]  -> wl_data_source@31.offer("image/pic")
[1675147,684]  -> wl_data_source@31.offer("image/ppm")
[1675147,694]  -> wl_data_source@31.offer("image/rgb")
[1675147,705]  -> wl_data_source@31.offer("image/rgba")
[1675147,717]  -> wl_data_source@31.offer("image/sgi")
[1675147,728]  -> wl_data_source@31.offer("image/tga")
[1675147,739]  -> wl_data_source@31.offer("image/tif")
[1675147,750]  -> wl_data_source@31.offer("image/tiff")
[1675147,761]  -> wl_data_source@31.offer("image/wbmp")
[1675147,773]  -> wl_data_source@31.offer("image/webp")
[1675147,784]  -> wl_data_source@31.offer("image/xbm")
[1675147,796]  -> wl_data_source@31.offer("image/xpm")
[1675147,812]  -> wl_data_device@10.set_selection(wl_data_source@31, 42469)
[1675147,831]  -> wl_data_source@34.destroy()                      <-- this
looks very suspicious
[1675148,131]  -> xdg_toplevel@20.set_min_size(921, 411)
[1675148,158]  -> xdg_toplevel@20.set_max_size(0, 0)
[1675148,175]  -> wl_surface@50.commit()

A good old gdb showed:

Thread 1 "spectacle" hit Breakpoint 1,
QtWaylandClient::QWaylandDataOffer::~QWaylandDataOffer (this=0x555555b52a60,
__in_chrg=<optimized out>)
    at qwaylanddataoffer.cpp:66
66      qwaylanddataoffer.cpp: Aucun fichier ou dossier de ce type.
(gdb) bt
#0  QtWaylandClient::QWaylandDataOffer::~QWaylandDataOffer
(this=0x555555b52a60, __in_chrg=<optimized out>) at qwaylanddataoffer.cpp:66
#1  0x00007ffff3810d52 in
QScopedPointerDeleter<QtWaylandClient::QWaylandDataOffer>::cleanup
(pointer=<optimized out>)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qscopedpointer.h:60
#2  QScopedPointer<QtWaylandClient::QWaylandDataOffer,
QScopedPointerDeleter<QtWaylandClient::QWaylandDataOffer> >::reset (other=0x0, 
    this=<optimized out>) at
/usr/include/x86_64-linux-gnu/qt5/QtCore/qscopedpointer.h:159
#3  QtWaylandClient::QWaylandDataDevice::invalidateSelectionOffer
(this=<optimized out>) at qwaylanddatadevice.cpp:87
#4  0x00007ffff37f01b6 in
QtWaylandClient::QWaylandInputDevice::Keyboard::handleFocusLost
(this=0x55555560cb50) at qwaylandinputdevice.cpp:1305

So qtwaylandclient discard the data_offer upon keyboard focus loss, which would
be fine for primary selection copy, but it is not for regular case.

This seems to relate to the bug fix https://bugreports.qt.io/browse/QTBUG-73825
And qt patch https://codereview.qt-project.org/c/qt/qtwayland/+/253360

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to