Skip to content

Feature/wayland support#9

Open
pplupo wants to merge 3 commits into
Euro-Office:mainfrom
pplupo:feature/wayland-migration
Open

Feature/wayland support#9
pplupo wants to merge 3 commits into
Euro-Office:mainfrom
pplupo:feature/wayland-migration

Conversation

@pplupo

@pplupo pplupo commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

wayland support

@pplupo pplupo changed the title Feature/wayland supportt Feature/wayland support Jun 26, 2026
@pplupo pplupo force-pushed the feature/wayland-migration branch from 2e883f3 to a6781f6 Compare July 1, 2026 22:19
Comment on lines +963 to +967
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_SQLITE:
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_DUCKDB:
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_PARQUET:
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_MDB:
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_FDB:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should go into your data recovery PR

static bool s_inProcessEvents = false;
if (!s_inProcessEvents) {
s_inProcessEvents = true;
QCoreApplication::processEvents();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks dangerous. The static guard prevents direct OnPaint recursion, but processEvents() here runs the whole Qt loop while we're still inside a CEF callback. Couldn't that re-enter CefDoMessageLoopWork (reentrant calls aren't supported), or dispatch a pending user event (e.g. tab close) that destroys this view while OnPaint is still on the stack?

@pplupo pplupo force-pushed the feature/wayland-migration branch from 1975cd3 to f0c0f60 Compare July 2, 2026 18:09
Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
@pplupo pplupo force-pushed the feature/wayland-migration branch 4 times, most recently from 2dd3912 to 8831b5e Compare July 7, 2026 19:46
pplupo added 2 commits July 7, 2026 15:58
Enable Qt input method handling for dead key sequences (ã, é, ü, ç, etc.):

1. Enable WA_InputMethodEnabled on the QCefView widget for Wayland
2. Suppress raw dead key events (Qt::Key_Dead_Grave..Key_Dead_Greek) in
   keyPressEvent/keyReleaseEvent so Qt's IM can compose them
3. Add inputMethodEvent handler that receives the composed character and
   sends it to CEF via the full KEYDOWN->CHAR->KEYUP sequence
4. Add inputMethodQuery to support Qt's IM state queries

Applied cleanly on top of acc5477b (074a568 in desktop-sdk) with no
changes to OnPaint or any other rendering code.

Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
CEF's off-screen render buffer reached Qt through OnPaint calling
repaint()/update() from inside CEF's callback stack. On Wayland the
wl_surface_commit / frame-callback handshake never completed at a
top-of-loop point, so the app looked frozen until a physical input
event forced a synchronous flush.

Iterations tried before landing on the fix:
- Fixed the 16ms Wayland heartbeat detection (QGuiApplication::platformName()
  instead of an env var check that could miss Qt6's default Wayland backend).
- Swapped repaint()/sendEvent(UpdateRequest) for a plain update() call in
  OnPaint.
- Moved the repaint trigger out of OnPaint entirely: OnPaint now only stages
  the frame and sets a dirty flag; a top-of-loop poller drove update() and
  QWindow::requestUpdate(). This didn't fully clear the stall on this
  compositor -- rendering still only committed on user input, effectively
  back to the original symptom.
- Added a guarded, input-excluded processEvents() fallback in the poller.
  This regressed badly: since content animates continuously, the poller
  spun the loop ~60x/sec while excluding user input, starving mouse and
  keyboard. Removed.

Final fix: present the CEF buffer through a QOpenGLWidget overlay
(QCefGLWidget) instead of the raster QWidget backing store. On Wayland the
GL swap is itself the wl_surface_commit and is throttled by the
compositor's frame callback natively, so presentation no longer depends on
a top-of-loop nudge or a physical input event to complete. OnPaint stages
the frame and pushes it to the overlay; the poller only nudges a repaint,
with no event-loop spin.

Also pulls in the OpenGLWidgets Qt module locally in qt_wrapper's
CMakeLists.txt and .pro file, since the build only resets desktop-sdk and
never touches core/common.cmake.

Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
@pplupo pplupo force-pushed the feature/wayland-migration branch from 8831b5e to edcb6e5 Compare July 7, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants