bbbb160f.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From bbbb160f30a394655cff9398d17961142388b0f2 Mon Sep 17 00:00:00 2001
  2. From: David Edmundson <kde@davidedmundson.co.uk>
  3. Date: Wed, 17 Nov 2021 15:20:08 +0000
  4. Subject: [PATCH] Only create window handles for actual windows
  5. winId() creates a platform window for the given widget. This makes sense
  6. for the topmost widget in a tree, we can't assume the parent widget is
  7. the topmost widget.
  8. Doing this on XCB is confusing and wrong, but apparently harmless. Doing
  9. this on wayland causes issues as we promote the parent window to a
  10. subsurface but never show that window leaving things in a bizarre
  11. corrupt state that leads to content not updating.
  12. BUG: 445196
  13. ---
  14. gstreamer/videowidget.cpp | 6 +++---
  15. 1 file changed, 3 insertions(+), 3 deletions(-)
  16. diff --git a/gstreamer/videowidget.cpp b/gstreamer/videowidget.cpp
  17. index bd27b21f..83fa9b9e 100644
  18. --- a/gstreamer/videowidget.cpp
  19. +++ b/gstreamer/videowidget.cpp
  20. @@ -158,7 +158,7 @@ void VideoWidget::setupVideoBin()
  21. gst_object_unref(videopad);
  22. QWidget *parentWidget = qobject_cast<QWidget*>(parent());
  23. if (parentWidget) {
  24. - parentWidget->winId(); // Due to some existing issues with alien in 4.4,
  25. + parentWidget->window()->winId(); // Due to some existing issues with alien in 4.4,
  26. // we must currently force the creation of a parent widget.
  27. }
  28. m_isValid = true; //initialization ok, accept input
  29. @@ -171,8 +171,8 @@ void VideoWidget::setupVideoBin()
  30. gst_object_unref(videopad);
  31. QWidget *parentWidget = qobject_cast<QWidget*>(parent());
  32. if (parentWidget) {
  33. - parentWidget->winId(); // Due to some existing issues with alien in 4.4,
  34. - // we must currently force the creation of a parent widget.
  35. + parentWidget->window()->winId(); // Due to some existing issues with alien in 4.4,
  36. + // we must currently force the creation of a parent widget's window
  37. }
  38. m_isValid = true; //initialization ok, accept input
  39. }
  40. --
  41. GitLab