Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-137113

Text Cursor Position Loss after ALT+TAB Context Switch on WSL2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • 6.6.2
    • GUI: Window management
    • Ubuntu-24.10 (WSL Windows 11)
    • Windows

    Description

      I first noticed the issue I describe below when using QOwNotes (built from source), but it may be widespread: the same issue appears in Qt Creator; and the "orderform" example from the relevant Ubuntu APT packages (`qtcreator` and `qt6-base-examples`). I am working within Ubuntu 24.10 under WSL2 on Windows 11. I'll describe the issue in the simplest of those 3 applications: the "orderform" Qt example. It can be launched using:

      /usr/lib/x86_64-linux-gnu/qt6/examples/widgets/richtext/orderform/orderform

      I start by editing some of the text in the main "orderform" window, and switch to another window via ALT+TAB, or by clicking the taskbar icon with the mouse. When I then switch back, the program has lost track of my previous cursor position (or pane/subwindow in general). I would expect that typing on the keyboard will continue editing the "orderform" text where I left it. Instead I have to use the mouse, and click in the pane/subwindow (and try to remember where/what I was last writing).

      I wondered if all Ubuntu GUI applications under WSL were affected. I tried Evince (installed via APT as in `sudo apt-get install evince`, and identified that Evince does not have this issue. For example, one can open a pdf with Evince, and click the top left button to show the side pane. By clicking in the side pane one can press UP/DOWN to move from page to page. The side pane is still active after a pair of ALT+TAB keypresses. Clicking instead in Evince's main pdf view, lets UP/DOWN now traverse the pdf with finer granularity (almost line-by-line); and a pair of ALT+TAB keypresses causes no problem here either.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            liaqi Liang Qi
            pkeir Paul Keir
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes