From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eijiro Sumii Newsgroups: gmane.emacs.bugs Subject: bug#36779: 25.1; mouse click not recognized for frames with large left position Date: Wed, 7 Aug 2019 12:07:00 +0900 Message-ID: References: <87h87c2hhg.fsf@LAPTOP-0TO7HGG8.localdomain> <8336ivpkt5.fsf@gnu.org> <83o91inuse.fsf@gnu.org> <6b7c63b2-9b69-6955-1e4b-82b86c088da6@gmx.at> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000003dea70058f7e3ce4" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="40310"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Eijiro Sumii , 36779@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 07 05:08:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hvCJ7-000AKW-O9 for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Aug 2019 05:08:09 +0200 Original-Received: from localhost ([::1]:37024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvCJ6-0007eW-9k for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Aug 2019 23:08:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54577) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvCJ1-0007eE-Ah for bug-gnu-emacs@gnu.org; Tue, 06 Aug 2019 23:08:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvCJ0-00079t-2l for bug-gnu-emacs@gnu.org; Tue, 06 Aug 2019 23:08:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57419) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvCIz-00079j-Vk for bug-gnu-emacs@gnu.org; Tue, 06 Aug 2019 23:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hvCIz-000861-O2 for bug-gnu-emacs@gnu.org; Tue, 06 Aug 2019 23:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eijiro Sumii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Aug 2019 03:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36779 X-GNU-PR-Package: emacs Original-Received: via spool by 36779-submit@debbugs.gnu.org id=B36779.156514722931053 (code B ref 36779); Wed, 07 Aug 2019 03:08:01 +0000 Original-Received: (at 36779) by debbugs.gnu.org; 7 Aug 2019 03:07:09 +0000 Original-Received: from localhost ([127.0.0.1]:38007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvCI8-00084m-R9 for submit@debbugs.gnu.org; Tue, 06 Aug 2019 23:07:09 -0400 Original-Received: from eimail.ecei.tohoku.ac.jp ([130.34.41.153]:33234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvCI6-00084d-EA for 36779@debbugs.gnu.org; Tue, 06 Aug 2019 23:07:07 -0400 Original-Received: from eimail.ecei.tohoku.ac.jp (localhost [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id 46DEF26121 for <36779@debbugs.gnu.org>; Wed, 7 Aug 2019 12:07:04 +0900 (JST) Original-Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) by eimail.ecei.tohoku.ac.jp (Postfix) with ESMTPSA id E5F5D2612D for <36779@debbugs.gnu.org>; Wed, 7 Aug 2019 12:07:03 +0900 (JST) Original-Received: by mail-ot1-f52.google.com with SMTP id z23so70213374ote.13 for <36779@debbugs.gnu.org>; Tue, 06 Aug 2019 20:07:03 -0700 (PDT) X-Gm-Message-State: APjAAAUOvTFFIat5Ogm+yHZkXVdsA+bdVfk9QAr45Fq6n0BhQVGQTMu5 KHDNzgBCLg3PzgsQ3YUEeWI6MkjmwHKZLq4MyWk= X-Google-Smtp-Source: APXvYqwf52fuX0jKuJfb5/AX7A4RzodQe7ysfVKzdT67uiifz/WQPQxl0UvHAmEw39ZI3DyAZNqQgW8eO0y6keZcPy0= X-Received: by 2002:a5d:8e16:: with SMTP id e22mr7073592iod.171.1565147222893; Tue, 06 Aug 2019 20:07:02 -0700 (PDT) In-Reply-To: X-Gmail-Original-Message-ID: X-TM-AS-MML: disable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164702 Archived-At: --0000000000003dea70058f7e3ce4 Content-Type: text/plain; charset="UTF-8" After more investigations (with Emacs 26.2 and GTK 3.22.11 - the latter is old but easier to compile in my environment), it turned out that the x-coordinates given to (GTK and) Emacs from the X server are sometimes (though not always) incorrect and negative: Thread 1 "emacs" hit Breakpoint 1, handle_one_xevent (dpyinfo=0x2da2c60, event=0x7ffffffecf40, finish=0xc42d8c , hold_quit=0x7ffffffed210) at xterm.c:8838 8838 bool tool_bar_p = false; (gdb) display event->xbutton 1: event->xbutton = {type = 4, serial = 3674, send_event = 0, display = 0x2d6d000, window = 12583239, root = 51, subwindow = 0, time = 1342862408, x = -601, y = 206, x_root = 1919, y_root = 372, state = 0, button = 1, same_screen = 1} (gdb) up #1 0x0000000000519853 in event_handler_gdk (gxev=0x7ffffffecf40, ev=0x2d87b50, data=0x0) at xterm.c:7594 7594 += handle_one_xevent (dpyinfo, xev, ¤t_finish, (gdb) #2 0x00007ffffdb85dc8 in gdk_event_apply_filters (xevent=0x7ffffffecf40, event=0x2d87b50, window=0x0) at gdkeventsource.c:79 79 result = filter->function (xevent, event, filter->data); (gdb) #3 0x00007ffffdb861ba in gdk_event_source_translate_event (event_source=0x2d87780, xevent=0x7ffffffecf40) at gdkeventsource.c:198 198 result = gdk_event_apply_filters (xevent, event, NULL); (gdb) #4 0x00007ffffdb86543 in _gdk_x11_display_queue_events (display=0x2d79100) at gdkeventsource.c:341 341 event = gdk_event_source_translate_event (event_source, &xevent); (gdb) #5 0x00007ffffdb3846a in gdk_display_get_event (display=0x2d79100) at gdkdisplay.c:438 438 GDK_DISPLAY_GET_CLASS (display)->queue_events (display); (gdb) down #4 0x00007ffffdb86543 in _gdk_x11_display_queue_events (display=0x2d79100) at gdkeventsource.c:341 341 event = gdk_event_source_translate_event (event_source, &xevent); (gdb) display xevent->xbutton 2: xevent->xbutton = {type = 4, serial = 3674, send_event = 0, display = 0x2d6d000, window = 12583239, root = 51, subwindow = 0, time = 1342862408, x = -601, y = 206, x_root = 1919, y_root = 372, state = 0, button = 1, same_screen = 1} According to the user support, this is a limitation of the (proprietary) X server when multiple monitors and resolutions are switched after it has started. Why this happens only to Emacs (not other X clients or GTK applications) is still a mystery to me, but I think we can close this issue. Sorry and _many_ thanks for all the help! --0000000000003dea70058f7e3ce4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
After more investigations (with Emacs 26.2 and GTK 3.22.11= - the
latter is old but easier to compile in my environment), it turned= out
that the x-coordinates given to (GTK and) Emacs from the X server a= re
sometimes (though not always) incorrect and negative:

Thr= ead 1 "emacs" hit Breakpoint 1, handle_one_xevent (dpyinfo=3D0x2d= a2c60, event=3D0x7ffffffecf40, finish=3D0xc42d8c <current_finish>, ho= ld_quit=3D0x7ffffffed210)=C2=A0 =C2=A0 at xterm.c:8838
8838 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bool tool_bar_p =3D false;
(gdb) display = event->xbutton
1: event->xbutton =3D {type =3D 4, serial =3D 3674,= send_event =3D 0, display =3D 0x2d6d000, window =3D 12583239, root =3D 51,= subwindow =3D 0, time =3D 1342862408,
=C2=A0 x =3D -601, y =3D 206, x_r= oot =3D 1919, y_root =3D 372, state =3D 0, button =3D 1, same_screen =3D 1}=
(gdb) up
#1 =C2=A00x0000000000519853 in event_handler_gdk (gxev=3D0x= 7ffffffecf40, ev=3D0x2d87b50, data=3D0x0) at xterm.c:7594
7594 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0+=3D handle_one_xevent (dpyinfo, xev, &curre= nt_finish,
(gdb)
#2 =C2=A00x00007ffffdb85dc8 in gdk_event_apply_filte= rs (xevent=3D0x7ffffffecf40, event=3D0x2d87b50, window=3D0x0) at gdkeventso= urce.c:79
79 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0result =3D filter->fun= ction (xevent, event, filter->data);
(gdb)
#3 =C2=A00x00007ffffdb8= 61ba in gdk_event_source_translate_event (event_source=3D0x2d87780, xevent= =3D0x7ffffffecf40) at gdkeventsource.c:198
198 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0result =3D gdk_event_apply_filters (xevent, event, NULL);
(gdb= )
#4 =C2=A00x00007ffffdb86543 in _gdk_x11_display_queue_events (display= =3D0x2d79100) at gdkeventsource.c:341
341 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0event =3D gdk_event_source_translate_event (event_source, &xevent= );
(gdb)
#5 =C2=A00x00007ffffdb3846a in gdk_display_get_event (displa= y=3D0x2d79100) at gdkdisplay.c:438
438 =C2=A0 =C2=A0 =C2=A0 =C2=A0GDK_DI= SPLAY_GET_CLASS (display)->queue_events (display);
(gdb) down
#4 = =C2=A00x00007ffffdb86543 in _gdk_x11_display_queue_events (display=3D0x2d79= 100) at gdkeventsource.c:341
341 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0event= =3D gdk_event_source_translate_event (event_source, &xevent);
(gdb)= display xevent->xbutton
2: xevent->xbutton =3D {type =3D 4, seria= l =3D 3674, send_event =3D 0, display =3D 0x2d6d000, window =3D 12583239, r= oot =3D 51, subwindow =3D 0, time =3D 1342862408,
=C2=A0 x =3D -601, y = =3D 206, x_root =3D 1919, y_root =3D 372, state =3D 0, button =3D 1, same_s= creen =3D 1}

According to the user support, this is a limitation of = the
(proprietary) X server when multiple monitors and resolutions areswitched after it has started.=C2=A0 Why this happens only to Emacs (notother X clients or GTK applications) is still a mystery to me, but I
t= hink we can close this issue.=C2=A0 Sorry and _many_ thanks for all the
= help!
--0000000000003dea70058f7e3ce4--