Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#66 hollow cursor - broken mouse functions

closed
nobody
None
5
2012-06-29
2012-05-22
Thomas Wolff
No

Normally, a terminal with focus would display a solid cursor which becomes a hollow (border-only) cursor when out-of-focus (cursor placed in a different window).
So did mlterm 2.7.
Now, once the cursor gets hollow (after out-of-focus), it never returns to solid again (after in-focus).

Discussion

  • Thomas Wolff
    Thomas Wolff
    2012-05-24

    Additional observations and probably related effects:

    * The previously described bug only occurs if I click into the text area directly. If I re-focus mlterm by clicking its title bar of window border, cursor will be solid.

    * Also the reverse can happen: if I leave mlterm focus by clicking another window on its title/border, the mlterm cursor does not change to hollow out-of-focus style but stays solid.

    * If an application is running with mouse modes enabled and mlterm is refocussed with the cursor staying hollow, mouse escapes will not work anymore until the cursor is made solid again (by suitable focus actions).

     
  • Thomas Wolff
    Thomas Wolff
    2012-05-24

    • summary: hollow cursor --> hollow cursor - broken mouse functions
     
  • Thomas Wolff
    Thomas Wolff
    2012-05-31

    Additional observation (probably not more helpful):
    The assumption of mlterm about focus and adjustment of its cursor shape correlates with the focus out/in reports of mode ESC[?1004h, i.e. if for example I click into mlterm such that the cursor stays hollow, it sends ESC [ I ESC [ O to the application.

     
  • Araki Ken
    Araki Ken
    2012-06-11

    I still can't reproduce this problem.
    Which window manager do you use ?

     
  • Thomas Wolff
    Thomas Wolff
    2012-06-12

    Good question. This is with Cygwin/X, with both local (Cygwin) mlterm or remote mlterm.
    Trying Exceed, the problem does not occur.
    Also, checking the Focus ESC sequences, a similar issue is observed with xterm, although not with the "hollow cursor" effect.
    I'll report the issue to Cygwin/X.

     
  • Thomas Wolff
    Thomas Wolff
    2012-06-13

    X events with Cygwin/X

     
    Attachments
  • Thomas Wolff
    Thomas Wolff
    2012-06-13

    X events with Exceed

     
    Attachments
  • Thomas Wolff
    Thomas Wolff
    2012-06-13

    I traced X events when clicking windows in focus and out of focus, using xev,
    but while there are some differences between Cygwin/X and Exceed I don't see
    anything obvious that would support the suspicion that the problem is with the X server. See xev-* files attached, filtered out Motion, Configure, Property Notify events.

    Then I added some debug output to mlterm to see what might be happening (see patch attached), not understanding mlterm details though...
    You my want to try that.
    It can be seen that the occurrences of FocusIn/FocusOut and notify_focus_in_to_children/notify_focus_out_to_children are often out of sync;
    e.g. in the case that I click into mlterm (text pane, not border) and the cursor remains hollow, the last debug output is:
    notify_focus_out_to_children
    notify_focus_out_to_children
    notify_focus_out_to_children
    FocusIn

    - which makes me think that if you associate the cursor tweaking with the "Focus" events instead of the "_to_children" events, the issue might get fixed.

     
  • Araki Ken
    Araki Ken
    2012-06-13

    Thanks. I could reproduce it.
    How about the attached patch ?

     
  • Thomas Wolff
    Thomas Wolff
    2012-06-14

    This improves the situation. The cursor always becomes solid when mlterm gets the focus (this is the most important part). It does not always get hollow if mlterm gets unfocussed, though; on the other hand, xterm shows the same behaviour (seen only once with cygwin xterm but frequently with a remote xterm).

    One weird observation:
    If I switch focus between two other windows A and B, normally mlterm would be unaffected. If I just move the cursor from A over mlterm to click into B (without clicking mlterm), however, after the click (into other window B) the mlterm cursor becomes solid and my debug output shows this:

    FocusIn
    notify_focus_in_to_children
    notify_focus_in_to_children
    notify_focus_in_to_children
    FocusIn
    notify_focus_in_to_children

    This issue, however, is clearly related to Cygwin/X and can be reproduced with xev instead of mlterm; the FocusIn event is sent to the wrong window.

     
  • Araki Ken
    Araki Ken
    2012-06-29

    • status: open --> closed