Bug 162404 - Possible Mishandling of GTK 3.0 Settings Property 'gtk-cursor-aspect-ratio'
Summary: Possible Mishandling of GTK 3.0 Settings Property 'gtk-cursor-aspect-ratio'
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2024-08-08 21:08 UTC by abyss
Modified: 2024-09-19 05:28 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
cursor comparisons (667.33 KB, video/webm)
2024-08-23 12:53 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description abyss 2024-08-08 21:08:49 UTC
Description:
The property 'gtk-cursor-aspect-ratio' is documented at URL https://docs.gtk.org/gtk3/property.Settings.gtk-cursor-aspect-ratio.html . Before I reinstalled Debian 12 Linux due to an inability to update my kernel with package manager APT, I had made the text cursor in Writer (and probably Impress) with a line in file '~/.config/gtk-3.0/gtk.css' that was '* { -GtkWidget-cursor-aspect-ratio: 0.06; }'.

I am currently using Debian 12.6 Linux, XFCE 4.18, LibreOffice 7.4.7.2 Community Edition, and Firefox 115.14.0esr (just updated from 115.13.0esr with same text cursor  behavior). I am also using a proprietary NVIDIA driver for my GPU, which is a NVIDIA RTX 2080 Super / Max-Q. The CPU is x86-64 (Intel i9).

It is about a month after I reinstalled Debian 12 (12.6 to be exact). A few days ago I noticed how thin the text cursor was and decided to address it. I am not sure how it was before that, i.e. right after the install. Linux administration for this laptop and for a virtual machine I use for an email server and a web server and other concerns and my memory limits dictated by obstructive sleep apnea prevent me from keeping details in my head for long.

As it stands now, I updated the line in file '~/.config/gtk-3.0/gtk.css' to '* { -GtkWidget-cursor-aspect-ratio: 0.12; }' to get satisfactory results with the text cursor in LibreOffice Writer. However, as a result the text cursor shown by Firefox is approximately twice as wide as I would like.

Also, Writer did not allow for customization of the cursor aspect ratio until I changed the permission on directory 'gtk-3.0' from 755 (rwxr-xr-x) to 700 (rwx------), which is more restrictive, and that is weird to me. Also, the file '~/.config/gtk-3.0/settings.ini' with the consecutive lines '[Settings]' and 'gtk-cursor-aspect-ratio = 0.5' does not at all set the cursor aspect ratio in Writer. Testing the GTL 3.0 property configuration requires logging out or a reboot. I notice that the cursor aspect ratio is not a property listed in XFCE 4.18, Settings Editor, and adding it there under '/Gtk/CursorAspectRatio' or '/Net/Cursor/AspectRatio' did nothing.

It is interesting that I must double the value of property 'gtk-cursor-aspect-ratio' for Writer and the result in Firefox looks about two times too wide. Thus, I suspect that at least in my case Writer is halving the text cursor aspect ratio from what it should be. Why the property specification in file 'settings.ini' did not work I do not know. However, I do know that if I specify under '[Settings]' the line 'gtk-primary-button-warps-slider = false', I get the incremental page behavior I want (which I suppose is the more traditional behavior for GUIs in general).

I don't know who can or can't reproduce this behavior. I am not sure what if any software has a bug to explain this. I looked at the bug history of LibreOffice and have found general complaints about the text cursor being too thin. If in some cases the cursor default were too thin by half, that might explain the complaints. This is all just a guess on my part. I submit this to see if anyone else can reproduce a cursor width difference between Writer and Firefox or other. For the record, text editor Geany has a separate configuration setting for text cursor width under Tools > Configuration Files > filetypes.common .

Steps to Reproduce:
1.Leave unset for the default or on Linux set the GTK 3.0 property 'gtk-cursor-aspect-ratio' to a not small value (at least 0.1).
2.Log out and in or reboot to make any configuration changes take effect.
3.Compare the text cursor thicknesses in Writer and in Firefox (or other?)

Actual Results:
For me, divergence of text cursor widths as already stated. You may not have the problem I do. I found nothing online.

Expected Results:
I think the cursor aspect ratio should be the same on all software that uses the GTK 3.0 property 'gtk-cursor-aspect-ratio'. In my case that seems to be Writer and Firefox.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
N/A.
Comment 1 Julien Nabet 2024-08-09 12:20:24 UTC
LO 7.4 is EOL, like 7.5 and 7.6

Could you give a try to LO 24.2.5 (present in Debian testing repo)?

Remark: Debian stable is more for servers than for desktop where Office apps are used.
"testing" is a good compromise between stability and recent versions.
Comment 2 abyss 2024-08-09 16:23:00 UTC
Julien, thanks for the response. I looked at the Linux x86-64 download and it looks like a Redhat rpm distro. I read about a DEBS directory in file 'readmes/README_en-US', but there was not DEBS directory for Debian Linux. That is just as well. I added bookworm-backports archive to my system in file '/etc/apt/sources.list' and was able to try to get package 4:24.2.5-1~bpo12+1 . I tried to install metapackage libreoffice from bookworm-backports, but it complained about dependencies. Listed by apt show was the dependency on bookworm-backports package libreoffice-core. It did not work.

Here is the dependency issues according to 'apt'.
[doug@burr ~]$ sudo apt install libreoffice/bookworm-backports libreoffice-core/bookworm-backports
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Selected version '4:24.2.5-1~bpo12+1' (Debian Backports:stable-backports [amd64]) for 'libreoffice'
Selected version '4:24.2.5-1~bpo12+1' (Debian Backports:stable-backports [amd64]) for 'libreoffice-core' because of 'libreoffice'
Selected version '4:24.2.5-1~bpo12+1' (Debian Backports:stable-backports [all]) for 'libreoffice-common' because of 'libreoffice-core'
Selected version '4:24.2.5-1~bpo12+1' (Debian Backports:stable-backports [all]) for 'libreoffice-uiconfig-common' because of 'libreoffice-common'
Selected version '4:24.2.5-1~bpo12+1' (Debian Backports:stable-backports [amd64]) for 'uno-libs-private' because of 'libreoffice-core'
Selected version '4:24.2.5-1~bpo12+1' (Debian Backports:stable-backports [all]) for 'libreoffice-java-common' because of 'libreoffice'
Selected version '4:24.2.5-1~bpo12+1' (Debian Backports:stable-backports [amd64]) for 'libreoffice-core'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libreoffice : Depends: libreoffice-calc but it is not installable
               Recommends: libreoffice-nlpsolver but it is not going to be installed
               Recommends: libreoffice-report-builder but it is not going to be installed
               Recommends: libreoffice-script-provider-bsh but it is not going to be installed
               Recommends: libreoffice-script-provider-js but it is not going to be installed
               Recommends: libreoffice-sdbc-mysql but it is not installable
               Recommends: libreoffice-wiki-publisher but it is not going to be installed
               Recommends: libreoffice-java-common (>= 4:24.2.5~) but it is not going to be installed
 libreoffice-base : Depends: libreoffice-core (= 4:7.4.7-1+deb12u4) but 4:24.2.5-1~bpo12+1 is to be installed
                    Recommends: libreoffice-java-common (>= 4:7.4.7~) but it is not going to be installed
 libreoffice-common : Breaks: libreoffice-core-nogui (< 4:24.2~) but 4:7.4.7-1+deb12u4 is to be installed
 libreoffice-core : Conflicts: libreoffice-core-nogui but 4:7.4.7-1+deb12u4 is to be installed
                    Breaks: libreoffice-base (< 4:24.2.5-1~bpo12+1) but 4:7.4.7-1+deb12u4 is to be installed
                    Breaks: libreoffice-draw (< 4:24.2.5-1~bpo12+1) but 4:7.4.7-1+deb12u4 is to be installed
                    Breaks: libreoffice-impress (< 4:24.2.5-1~bpo12+1) but 4:7.4.7-1+deb12u4 is to be installed
                    Breaks: libreoffice-writer (< 4:24.2.5-1~bpo12+1) but 4:7.4.7-1+deb12u4 is to be installed
 libreoffice-core-nogui : Conflicts: libreoffice-core but 4:24.2.5-1~bpo12+1 is to be installed
 libreoffice-draw : Depends: libreoffice-core (= 4:7.4.7-1+deb12u4) but 4:24.2.5-1~bpo12+1 is to be installed
 libreoffice-impress : Depends: libreoffice-core (= 4:7.4.7-1+deb12u4) but 4:24.2.5-1~bpo12+1 is to be installed
 libreoffice-math : Depends: libreoffice-core (= 4:7.4.7-1+deb12u4) but 4:24.2.5-1~bpo12+1 is to be installed
 libreoffice-writer : Depends: libreoffice-core (= 4:7.4.7-1+deb12u4) but 4:24.2.5-1~bpo12+1 is to be installed
 libuno-cppuhelpergcc3-3 : Depends: uno-libs-private (= 4:7.4.7-1+deb12u4) but 4:24.2.5-1~bpo12+1 is to be installed
 uno-libs-private : Breaks: libreoffice-core-nogui (< 4:7.5.0~) but 4:7.4.7-1+deb12u4 is to be installed
                    Breaks: libuno-cppuhelpergcc3-3 (< 4:7.5.0~) but 4:7.4.7-1+deb12u4 is to be installed
 ure : Depends: uno-libs-private (= 4:7.4.7-1+deb12u4) but 4:24.2.5-1~bpo12+1 is to be installed
E: Unable to correct problems, you have held broken packages.
[doug@burr ~]$ 

The dependency differences appear too great for my skill level at least. I do not welcome this system administration challenge. I use Debian Stable for a reason. I have had this installation of Debian 12.6 for barely a month (reinstall to correct no kernel updates after NVIDIA driver issue) and I think I will just accept LibreOffice package 4:7.4.7-1+deb12u4 as is. Maybe with Debian 13, trixie this will be fixed for me.

Sorry I cannot be of more help. If your latest version of LibreOffice does not have the issue with the text cursor, that's great.
Comment 3 Julien Nabet 2024-08-09 17:00:47 UTC
To be honest, I didn't give a try when I saw the old LO version and considering the number of existing bugtrackers concerning LO.

Let's say this bug is confirmed in LO, if it's solved, it won't be backported on 7.4 branch and will be only on 24.2 (or further branches like 24.8 and master).
So if you want absolutely to stick to stable Debian for some reason, you'll have to wait for the next stable release.

Let's put this tracker back to Unconfirmed since I don't have more questions + uncc myself since I can't help here.
Comment 4 Caolán McNamara 2024-08-23 12:53:49 UTC
Created attachment 195982 [details]
cursor comparisons
Comment 5 Caolán McNamara 2024-08-23 12:55:35 UTC
With that setting and checking gtk3-demo, LibreOffice and firefox they all look about the same sort of thickness to me.

So can't reproduce. The relevant code is likely the use of gtk-cursor-aspect-ratio in vcl/unx/gtk3/salnativewidgets-gtk.cxx from the work of bug #105415 some years ago.
Comment 6 Buovjaga 2024-09-19 05:28:55 UTC
abyss: you can try with an appimage https://www.libreoffice.org/download/appimage/