Summary: | Okular crashes in CursorWrapHelper::getScreen() when wrapping cursor on wayland | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Aleix Pol <aleixpol> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | aacid, laura.stern, nate |
Priority: | NOR | Keywords: | drkonqi, wayland |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=439417 | ||
Latest Commit: | https://invent.kde.org/graphics/okular/commit/b805603c58e64d63c4374ffb698aa513d73aa086 | Version Fixed In: | 21.08 |
Description
Aleix Pol
2021-05-19 00:56:04 UTC
David can you have a look at this? > Okular crashes as soon as the cursor leaves the window > as on Wayland we don't have a global cursor position. I don’t know how Wayland works (except that it doesn’t work on my computers). Can you tell me more how cursor positions work, or where I can read about it? > We won't be able to move the cursor either so the infinite > scrolling can happen but not to visibly move the cursor. Provided that the cursor has a position, not being able to move it shouldn’t be a problem. Here is some information. https://wayland-book.com/ In general terms, you need to understand that in Wayland you cannot move the cursor. So in general this part should be just skipped on wayland. The crash itself happens because it's unable to figure out the geometry of the current display. This is something that won't just fly here and should be avoided. You might want to add a KWindowSystem::isPlatformWayland() that just does the scrolling without moving the cursor. Thanks for the link. I will probably read more of it later. :) Scrolling without moving the cursor would be my preferred alternative, just like Blender does it. We were already trying to do that in https://invent.kde.org/graphics/okular/-/merge_requests/134, but that method depends on calling QCursor::setPos() unconditionally, and still flickers a bit. I can’t follow you how KWindowSystem::isPlatformWayland() is related. Git commit b805603c58e64d63c4374ffb698aa513d73aa086 by Albert Astals Cid, on behalf of David Hurka. Committed on 02/07/2021 at 21:36. Pushed by aacid into branch 'master'. CursorWrapHelper: Do not crash on Wayland. According to https://bugs.kde.org/show_bug.cgi?id=437334 the cursor position is not necessarily known on Wayland. That would trigger the Q_ASSERT_X, so this patch removes it. This does not solve the problem that we can not wrap the cursor, but it prevents crashing Okular if using the debug build on Wayland. You’re reading rectangular text. Related: bug 439471 M +0 -1 part/cursorwraphelper.cpp https://invent.kde.org/graphics/okular/commit/b805603c58e64d63c4374ffb698aa513d73aa086 |