From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#48809: 28.0.50; Missing Lucid/GTK2 graphical elements on tiling WM Date: Fri, 11 Jun 2021 13:02:10 +0100 Message-ID: <87y2bgfw3h.fsf@tcd.ie> References: <875yyv2jsi.fsf@tcd.ie> <1e9040b0-dbb8-fc45-2bb7-6ec6d9bf81eb@gmx.at> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4723"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 48809@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 11 14:04:01 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrftJ-000115-Gp for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Jun 2021 14:04:01 +0200 Original-Received: from localhost ([::1]:38816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrftI-0003HH-IG for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Jun 2021 08:04:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrfsM-0001or-7u for bug-gnu-emacs@gnu.org; Fri, 11 Jun 2021 08:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lrfsL-00026k-VU for bug-gnu-emacs@gnu.org; Fri, 11 Jun 2021 08:03:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lrfsL-0001vF-Tk for bug-gnu-emacs@gnu.org; Fri, 11 Jun 2021 08:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Jun 2021 12:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48809 X-GNU-PR-Package: emacs Original-Received: via spool by 48809-submit@debbugs.gnu.org id=B48809.16234129447340 (code B ref 48809); Fri, 11 Jun 2021 12:03:01 +0000 Original-Received: (at 48809) by debbugs.gnu.org; 11 Jun 2021 12:02:24 +0000 Original-Received: from localhost ([127.0.0.1]:38319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrfrj-0001uK-HH for submit@debbugs.gnu.org; Fri, 11 Jun 2021 08:02:24 -0400 Original-Received: from mail-wr1-f51.google.com ([209.85.221.51]:37432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrfre-0001u4-Pv for 48809@debbugs.gnu.org; Fri, 11 Jun 2021 08:02:21 -0400 Original-Received: by mail-wr1-f51.google.com with SMTP id i94so5804794wri.4 for <48809@debbugs.gnu.org>; Fri, 11 Jun 2021 05:02:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=mMO1rDo8+ISqRD4L4FkEf0DkYm+N3HWXArPiGqWHq54=; b=gb63rGU9VOaj+Hr85p4Qed0uL0Y130eE+6gSd809r417budCPprSavhmFOK2FRt6zI qL5FKuq3FY0ZQe/RciEGm6ShvX8F+onbdaoUxzt/MnbyuCPSiVot5B81CY+o/94rxMoy rORG9JsOVv9BpyIxjvIk+Jg8l54vUx4dGV2UrL6O33VbF0BjBVNT1H+Up1793zgSdn9C /qceTelyIIkArtYTKwFzCkTOR4gwxA0B5M5gjqU8EKGP3e7BY7lSyTYirzRfF+N3rZCE ghynIwl9tqqz5j0GZ/PJpziz60d6+6X4mys2WhRjqbRl3WLBHHYFoOzOCoSGbNGIvNIV i1Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=mMO1rDo8+ISqRD4L4FkEf0DkYm+N3HWXArPiGqWHq54=; b=iRb6iWRRCgsQdp/U2TI4QV2+z4xmgZpdhrQk/hFboIfHKq5VtvHpr+so1B2n2P8nmB 20B6e8Ln9k+NzNdvWrvmTzmaBdHtCLj2GPMNGTK0WSeGYGxiupfe/CU70Wa9zacZrwwm oWCpXvCjL8+9w4kD9O799aSDtvaZVWpmEITmshqmwtmpilPMMN9ZCFvAXXRSo6Np7PfF pMwHxdwD6gBh6Kfwg5V7ZOczT+QceUS/Mfw6P5QLgI/SO6DEeKspyqOry5IXmVS98UIx 2UZo27yCJ5X2ciPXioilt/jk9pynfF1Ot2oDyEQfvS1pY/XQPglTQkvFLu5rWMApfbJt jAzg== X-Gm-Message-State: AOAM533/YPp1/Dg7bqf4kgHXnm2QuQqvKwddHpqptLT1om97cmxAx9nI 7aD2k+kbUeiTWUMHuDbfWm1q7w== X-Google-Smtp-Source: ABdhPJzSFX3R8WZv8f+8gI89mP+g/6bO6cHMvdfdAAXC0YHCURTlvm5uwM8/e8DEG0cl26Fx6Mzd1w== X-Received: by 2002:adf:bc06:: with SMTP id s6mr3794042wrg.250.1623412932706; Fri, 11 Jun 2021 05:02:12 -0700 (PDT) Original-Received: from localhost ([51.37.22.80]) by smtp.gmail.com with ESMTPSA id s5sm5057055wrn.38.2021.06.11.05.02.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 05:02:11 -0700 (PDT) In-Reply-To: <1e9040b0-dbb8-fc45-2bb7-6ec6d9bf81eb@gmx.at> (martin rudalics's message of "Fri, 4 Jun 2021 11:17:05 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:208345 Archived-At: --=-=-= Content-Type: text/plain martin rudalics writes: >> Further to the tangent in bug#48229, the menu, tool, and scroll bars are >> sometimes not drawn when creating new Lucid/GTK2 frames under the tiling >> WM Xmonad. The missing elements reappear after the affected frames are >> resized. >> >> I cannot reproduce any of these issues with GTK3/PGTK, but the Lucid >> behaviour is present since at least Emacs 24.5.1 (I don't have old GTK2 >> builds at hand). Affected Emacs 28 configurations follow my signature. > > Thanks. The only thing that is evident from your examples is that only > toolkit elements are affected. Elements Emacs draws itself are not > missing in your examples. I suppose the behavior you see happens > because Xmonad rejects a first size proposal of Emacs for these elements > and does not draw them, notifies Emacs that it wants different sizes for > these elements and that notification gets lost - somehow and at least > sometimes. I have no good explanation why things work with GTK3 and not > with GTK2 though. Are all behaviors you reported reliably reproducible? Yes, 100% reliable/deterministic AFAICT, at least in my current setup. > One thing I'd like to exclude is that this is yet another instance of > Tom Gillespie's observation that Emacs does not play well with window > managers that do not set _NET_WM_STATE. x_get_current_wm_state > apparently fails on such systems and we probably never (or at least not > always) get a not_hidden frame in the MapNotify case and have to wait > for a ConfigureNotify instead (which your remark about the reappearance > of missing elements after resizing would confirm). > > To check this please do (setq frame-size-history '(100)) and proceed > with some of your broken behaviors. I'd be interested if when you then > do (frame--size-history) and look into the *frame-size-history* buffer > you can see > > "MapNotify, not hidden & not iconified" Correct: 0. emacs -Q 1. (setq frame-size-history '(100)) C-j 2. C-x 5 2 [The left scroll bar of the unselected frame is now missing.] 3. (progn (frame--size-history) (pop-to-buffer-same-window "*frame-size-history*")) C-x C-e This gives the following with Lucid, GTK2, and GTK3, respectively: --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=lucid.txt Content-Description: Lucid frame size history Frame size history of # x_create_frame_1 (5), TS=80x25~>720x450, NS=80x25~>738x452, IS=80x25~>736x450, MS=18x36 IH IV tool-bar-lines (1), NS=738x452~>738x470, MS=90x90 gui_figure_window_size (5), TS=720x450~>720x648, TC=80x25~>80x36, NS=738x470~>738x686, IS=736x450~>736x648, MS=18x36 IH IV update_from_various_frame_slots, PS=738x686, XS=738x686 set_frame_size EmacsFrameRealize EmacsFrameResize, PS=738x686, XS=738x686 change_frame_size_1, delayed, PS=738x686, XS=738x686 scroll-bar-width (3), NS=738x686~>754x686, IS=736x648~>752x648, MS=90x90 scroll-bar-height (3), MS=90x90 EmacsFrameResize, PS=754x686, XS=738x661, DS=738x686 change_frame_size_1, delayed, PS=754x686, XS=738x661, DS=738x686 menu-bar-lines (2), MS=90x90 EmacsFrameResize, PS=754x686, XS=738x661, DS=738x661 change_frame_size_1, delayed, PS=754x686, XS=738x661, DS=738x661 EmacsFrameResize, PS=754x686, XS=738x661, DS=738x661 change_frame_size_1, delayed, PS=754x686, XS=738x661, DS=738x661 x_create_frame_2 (0), MS=90x90 x_set_window_size_1, invisible, PS=754x686, XS=754x686, DS=754x686 x_set_window_size_1 (5), MS=18x36 IH IV EmacsFrameResize, PS=754x686, XS=754x686, DS=754x686 EmacsFrameResize, PS=754x686, XS=754x686, DS=754x686 x_make_frame_visible EmacsFrameResize, PS=754x686, XS=956x1029, DS=754x686 change_frame_size_1, delayed, PS=754x686, XS=956x1029, DS=754x686 MapNotify, not hidden & not iconified, PS=754x686, DS=956x1029 EmacsFrameResize, PS=754x686, XS=956x1029, DS=956x1029 change_frame_size_1, delayed, PS=754x686, XS=956x1029, DS=956x1029 change_frame_size (5), TS=720x648~>922x991, TC=80x36~>102x55, NS=754x686~>956x1029, IS=752x648~>954x991, MS=18x36 IH IV EmacsFrameResize, PS=956x1029, XS=956x1029 change_frame_size_1, delayed, PS=956x1029, XS=956x1029 EmacsFrameResize, PS=956x1029, XS=956x1029, DS=956x1029 EmacsFrameResize, PS=956x1029, XS=956x1029, DS=956x1029 EmacsFrameResize, PS=956x1029, XS=956x1029 change_frame_size_1, delayed, PS=956x1029, XS=956x1029 EmacsFrameResize, PS=956x1029, XS=956x1029, DS=956x1029 change_frame_size (5), MS=18x36 IH IV change_frame_size (5), MS=18x36 IH IV --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=gtk2.txt Content-Description: GTK2 frame size history Frame size history of # x_create_frame_1 (5), TS=80x25~>720x450, NS=80x25~>736x450, IS=80x25~>736x450, MS=18x36 IH IV gui_figure_window_size (5), TS=720x450~>720x648, TC=80x25~>80x36, NS=736x450~>736x648, IS=736x450~>736x648, MS=18x36 IH IV scroll-bar-width (3), NS=736x648~>752x648, IS=736x648~>752x648, MS=90x90 scroll-bar-height (3), MS=90x90 menu-bar-lines (2), MS=90x90 x_create_frame_2 (0), MS=90x90 xg_frame_set_char_size, invisible, PS=752x648, XS=752x648, DS=752x648 xg_frame_set_char_size (5), MS=18x36 IH IV x_make_frame_visible ConfigureNotify, PS=752x648, XS=752x648, DS=752x648 xg_frame_resized, unchanged, PS=752x648, XS=752x648 MapNotify, not hidden & not iconified, PS=752x648, DS=752x648 ConfigureNotify, PS=752x648, XS=956x1029, DS=752x648 xg_frame_resized, changed, PS=752x648, XS=956x1029 change_frame_size_1, delayed, PS=752x648, XS=956x1029, DS=752x648 tool-bar-lines (2), NS=752x648~>956x1029, MS=90x90 xg_frame_set_char_size, visible, PS=752x648, XS=956x1029, DS=956x1029 ConfigureNotify, PS=752x648, XS=956x985, DS=956x1029 xg_frame_resized, changed, PS=752x648, XS=956x985, DS=956x1029 change_frame_size_1, delayed, PS=752x648, XS=956x985, DS=956x1029 change_frame_size (5), TS=720x648~>924x985, TC=80x36~>102x54, NS=752x648~>956x985, IS=752x648~>956x985, MS=18x36 IH IV --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=gtk3.txt Content-Description: GTK3 frame size history Frame size history of # x_create_frame_1 (5), TS=80x25~>720x450, NS=80x25~>736x450, IS=80x25~>736x450, MS=18x36 IH IV gui_figure_window_size (5), TS=720x450~>720x648, TC=80x25~>80x36, NS=736x450~>736x648, IS=736x450~>736x648, MS=18x36 IH IV scroll-bar-width (3), NS=736x648~>752x648, IS=736x648~>752x648, MS=90x90 scroll-bar-height (3), MS=90x90 menu-bar-lines (2), MS=90x90 x_create_frame_2 (0), MS=90x90 xg_frame_set_char_size, invisible, PS=752x648, XS=752x648, DS=752x648 xg_frame_set_char_size (5), MS=18x36 IH IV x_make_frame_visible MapNotify, not hidden & not iconified, PS=752x648, DS=752x648 ConfigureNotify, PS=752x648, XS=956x1029, DS=752x648 xg_frame_resized, changed, PS=752x648, XS=956x1029 change_frame_size_1, delayed, PS=752x648, XS=956x1029, DS=752x648 change_frame_size (5), TS=720x648~>924x1029, TC=80x36~>102x57, NS=752x648~>956x1029, IS=752x648~>956x1029, MS=18x36 IH IV tool-bar-lines (2), MS=90x90 xg_frame_set_char_size, visible, PS=956x1029, XS=956x1029 ConfigureNotify, PS=956x1029, XS=956x988 xg_frame_resized, changed, PS=956x1029, XS=956x988 change_frame_size_1, delayed, PS=956x1029, XS=956x988 change_frame_size (5), TS=924x1029~>924x988, TC=102x57~>102x54, NS=956x1029~>956x988, IS=956x1029~>956x988, MS=18x36 IH IV --=-=-= Content-Type: text/plain > entries. Alternatively, you could set a watchpoint at xterm.c's > > bool not_hidden = x_get_current_wm_state (f, event->xmap.window, &value, &sticky); > > and see whether a value of true is ever returned. Also confirmed. > One thing you could try is to change > > if (v == 1 && f->visible != 1) > redisplay_other_windows (); > > to > > if (v == 1) > redisplay_other_windows (); > > in frame.h's SET_FRAME_VISIBLE so maybe Emacs would send the modified > elements (modified because the WM changed their size to something Emacs > didn't ask for) again. Honestly, I have no hope that this would help. Unfortunately it doesn't (at least not with Lucid). Thanks, -- Basil --=-=-=--