Public bug reported: xmessage text gets obscured with option combinations using buttons and geometry specifications.
Quick background: xmessage creates a new grey window with a white text box inside it. Without -buttons, the white text box usually spans the full width of the grey window that contains it, leaving no margins. Things start going wrong when you start specifying -buttons or -g (geometry), and text can end up being obscured. Problem #1: If the width of all the buttons you specify makes the grey window wider than the text, the white text box does not increase in width to match. You end up with an undesirable wide grey margin on the right side of the white text box. If you resize the window, making it less wide, the grey margin does not narrow; it moves in and covers and obscures the text, even though there is plenty of room for the text. Suggested Fix #1: The white text box must always be created the same width as the window that contains it, with no useless grey margin to the right. Narrowing the width of the window should not cause text to be obscured by a wide and useless fixed grey margin. Reproduce: xmessage -buttons 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 "123456789" Problem #2: If you add a -g (geometry) option and specify just the width (not the height) for a window with buttons wider than the text box, the obscuring grey margin persists. If you add a "-g NNN" option, where NNN is the width that xmessage would have chosen itself, then you get exactly the same unpleasant behaviour as Problem #1 above. If you increase the NNN to be wider that what xmessage would have used, then both the window and the text box width are created increased by that amount, as if you had resized the window with a mouse. The useless grey margin to the right of the text box stays the same width, just as in Problem #1. If you decrease the NNN to be narrower that what xmessage would have used, then both the window and the text box width are created decreased by that amount, as if you had resized the window with a mouse. Not all buttons will show; this is expected. What is not expected is that the useless grey margin to the right of the text box stays the same width, and so it now overwrites and obscures the text, even though there is plenty of room for the text. If you resize the window back so that all the buttons show, all the text also shows and we're back to Problem #1 above. Suggested Fix #2: Same as above. Reproduce (width 541 is my xmessage chosen width for font "fixed"): xmessage -g 400 -buttons 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 "123456789" xmessage -g 541 -buttons 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 "123456789" xmessage -g 700 -buttons 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 "123456789" Problem #3: If you add a -g option and specify both the width *and* the height for a window with buttons wider than the text, things get much worse. If you add a "-g NNNx55" option, where NNN is the width that xmessage would have chosen itself and "55" is about the same height, you would expect to get exactly the same results as if you didn't specify any geometry at all. That's not what happens. You get a fixed-width text window about 12 characters wide, with a huge grey margin on the right. It doesn't matter what size text you specify; the white text box will be created about 12 characters wide and any text to the right of that will be masked and obscured by the wide grey margin. Changing the width of the window has all the problems of Problems #1 and #2 above. Suggested Fix #3: Same as above. Specifying a geometry that is identical to what xmessage would have chosen itself should create an identical window. Text should not be obscured. Reproduce (width 541 is my xmessage chosen width for font "fixed"): xmessage -g 541x55 -buttons 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 "123456789-123 YOU DON'T SEE THIS" ProblemType: Bug DistroRelease: Ubuntu 22.04 Package: x11-utils 7.7+5build2 ProcVersionSignature: Ubuntu 5.15.0-30.31-generic 5.15.30 Uname: Linux 5.15.0-30-generic x86_64 ApportVersion: 2.20.11-0ubuntu82 Architecture: amd64 BootLog: CasperMD5CheckResult: unknown CompositorRunning: None CurrentDesktop: ubuntu:GNOME Date: Wed May 11 17:12:52 2022 DistUpgraded: 2022-04-04 16:21:26,723 DEBUG Running PostInstallScript: '/usr/lib/ubuntu-advantage/upgrade_lts_contract.py' DistroCodename: jammy DistroVariant: ubuntu DkmsStatus: v4l2loopback/0.12.5, 5.15.0-29-generic, x86_64: installed v4l2loopback/0.12.5, 5.15.0-30-generic, x86_64: installed GraphicsCard: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09) (prog-if 00 [VGA controller]) Subsystem: Fujitsu Limited. 2nd Generation Core Processor Family Integrated Graphics Controller [10cf:15f5] InstallationDate: Installed on 2020-09-08 (610 days ago) InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731) MachineType: FUJITSU LIFEBOOK T901 ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.15.0-30-generic root=UUID=15ed9ac2-63a9-4dac-87c2-63624740ec00 ro quiet splash vt.handoff=7 SourcePackage: x11-utils UpgradeStatus: Upgraded to jammy on 2022-04-04 (37 days ago) dmi.bios.date: 06/08/2011 dmi.bios.release: 1.8 dmi.bios.vendor: FUJITSU // Phoenix Technologies Ltd. dmi.bios.version: Version 1.08 dmi.board.name: FJNB228 dmi.board.vendor: FUJITSU dmi.chassis.type: 10 dmi.chassis.vendor: AOL671E812BB2011 dmi.modalias: dmi:bvnFUJITSU//PhoenixTechnologiesLtd.:bvrVersion1.08:bd06/08/2011:br1.8:svnFUJITSU:pnLIFEBOOKT901:pvr:rvnFUJITSU:rnFJNB228:rvr:cvnAOL671E812BB2011:ct10:cvr:sku: dmi.product.name: LIFEBOOK T901 dmi.sys.vendor: FUJITSU version.compiz: compiz N/A version.libdrm2: libdrm2 2.4.110-1ubuntu1 version.libgl1-mesa-dri: libgl1-mesa-dri 22.0.1-1ubuntu2 version.libgl1-mesa-glx: libgl1-mesa-glx 22.0.1-1ubuntu2 version.xserver-xorg-core: xserver-xorg-core 2:21.1.3-2ubuntu2 version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-2build3 version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20210115-1 version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.17-2build1 ** Affects: x11-utils (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug jammy ubuntu wayland-session -- You received this bug notification because you are a member of Ubuntu-X, which is subscribed to x11-utils in Ubuntu. https://bugs.launchpad.net/bugs/1973093 Title: xmessage loses text area as buttons are added and -g To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/x11-utils/+bug/1973093/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~ubuntu-x-swat Post to : ubuntu-x-swat@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-x-swat More help : https://help.launchpad.net/ListHelp