unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Joost Kremers <joostkremers@fastmail.fm>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: wrong cursor position reported when window margins are wide
Date: Tue, 28 Feb 2017 21:41:13 +0100	[thread overview]
Message-ID: <87a896xd3q.fsf@fastmail.fm> (raw)
In-Reply-To: <83wpcanv9c.fsf@gnu.org>


On Tue, Feb 28 2017, Eli Zaretskii wrote:
>> From: Joost Kremers <joostkremers@fastmail.fm>
>> Date: Tue, 28 Feb 2017 15:01:22 +0100
>> It seems that when the window margins of an Emacs window are 
>> non-nil, the cursor position is reported incorrectly, resulting 
>> in 
>> the input box being displayed in the wrong place.
>> 
>> The original bug report is here:
>> 
>> <https://github.com/joostkremers/visual-fill-column/issues/25#issuecomment-281844388>
>> 
>> There are screen shots that illustrate the problem. (Scroll 
>> down a 
>> bit for screen shots with `emacs -Q'.)
>
> Sorry, I couldn't understand what is meant by "cursor position
> reporting".  Could you clarify, 

Honestly, I'm in way over my head here, so I'm mainly going by 
this FAQ on the Fcitx site:

https://fcitx-im.org/wiki/FAQ#Cursor_Following_problem

which admittedly doesn't provide much info, either. Basically, 
from what I gather, Fcitx and ibus and similar input methods pop 
up an input box that follows the text cursor as you type. In order 
to do so, they need to know the absolute position of the text 
cursor on the screen. And in order to be able to determine 
(calculate?) this position, they need some info from the windowing 
system, which in turn receives this info from the active 
application.

I'm sorry I can't be more specific, but I know nothing about the 
internals of the X Window System, nor am I well-versed enough in C 
to go through the Fcitx source and figure out what information it 
is exactly that Fcitx requires from X. I was kinda hoping that 
someone here has more clue than I do and could help out.

> and perhaps show an example of how
> that reported position changes when a window has display 
> margins?

Apparently, judging by the screen shots posted in the Github 
thread, the reported position does *not* change, even though it 
should.


-- 
Joost Kremers
Life has its moments



  reply	other threads:[~2017-02-28 20:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-28 14:01 wrong cursor position reported when window margins are wide Joost Kremers
2017-02-28 16:19 ` Eli Zaretskii
2017-02-28 20:41   ` Joost Kremers [this message]
2017-03-01  3:40     ` Eli Zaretskii
2017-03-01  8:00       ` Joost Kremers
2017-03-01 16:14         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a896xd3q.fsf@fastmail.fm \
    --to=joostkremers@fastmail.fm \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).