Incorrect cursor displayed in text editors

This one is rather minor and may only pertain to Xfce.

To replicate the problem: You should have a Firefox and a Gedit window open in such a way that Firefox partly obscures Gedit or the other way around. > Now slowly move your mouse pointer from over Firefox (across the “border”) into over Gedit. > See (at border crossing) the mouse pointer turn into the icon for resizing (for me, it is a green dot between two arrowheads) and stay that way over Gedit (instead of turning into a vertical beam, which is the usual shape of the mouse pointer while over Gedit) > Click somewhere in Gedit, and see the mouse pointer stay dot-between-arrows. > Right-click somewhere in Gedit, and see it turn into a vertical beam.

Now the results of the experiment will vary depending on the app you use in place of Firefox and whether this app lies over Gedit or Gedit over the app.

I am on Stable Branch, Kernel 6.6.

ADDED LATER

The stopgap I found: Once the mouse pointer has become “dot between two arrowheads,” move it across the bottom border of the app (Gedit or Mousepad) and back into the app.

For Gedit stopgap works only if status bar is displayed (Preferences > View > Display status bar).

It’s less work than right-clicking and again having to left-click (to get rid of the context menu), but no a solution.

ADDED STILL LATER

A better stopgap I found is to change my cursor theme to Adwaita, which is free of the problem (see below). Every other theme I’ve tried is problematic. I am leaving this post open so it might one day receive a solution that works for all themes. Thanks.

Manjaro Xfce ISOs include mousepad text editor. Manjaro Gnome includes gedit

Do you have similar issues when using firefox and mousepad ?

Yes. Same issue with mousepad except that the occurrence is confined to cases of Firefox lying over, or obscuring a part of, mousepad (no issue if mousepad lies over Firefox).

I see why that “confinement.” Both Firefox and gedit generate (cause to appear) a “green dot between two arrows” resizer while mousepad generates a “small horizontal arrow pointing at a vertical bar” resizer.

So if mousepad lies over another window and supplies the “border,” then nothing to generate the “green dot between two arrows” resizer.

So, the problem seems to require these conditions.

  1. An app that generates a “green dot between two arrows” resizer lies over another app and supplies the border.
  2. That other app is the type whose normal mouse pointer is a vertical bar (as is the case with both Gedit and mousepad, but not e.g. Thunar).

I cannot replicate this with firefox and mousepad

On window borders, cursor changes to either /usr/share/icons/Maia-Cursor/cursors/left_side left_side
or /usr/share/icons/Maia-Cursor/cursors/right_side right_side
But in mousepad cursor reverts to /usr/share/icons/Maia-Cursor/cursors/text text

“dot between two arrowheads” sounds similar to /usr/share/icons/Maia-Cursor/cursors/size_hor size_hor
“green dot between two arrowheads” suggests system is using a different xcursor theme

Your comments inspired me!

I went to Whisker Menu > Settings > Mouse and Touchpad > Theme > saw that I was using Breeze, which looks like (you will see the “green dot between arrowheads”; only when in use the dot is really green on my screen instead of blue):

breeze

And so changed my theme to Adwaita:

Adwaita

And that fixed the problem!

Now ideally, I would like to be able to choose whichever theme I liked and not have a problem, but this is good enough.

Here’s another problem I found. Only Adwaita, Breeze, and Breeze Light are distinct. The others (Default, DMZ, Simple and soft, elementary) may display distinct previews, but when put to use look like Breeze. Thanks.

And I find that there is a whole slew of cursor themes I can mess with. This sort of thing could eat up hours!

As Gedit is traditionally a Gnome based/inspired editor, depending on GTK, it stands to reason that it might use the Adwaita cursor theme, if available.

There is a package that might address issues like this where GTK applications are used in other DE’s. I seem to recall @cscs briefly mentioning something of the sort, recently.

I meant to note the name of it for reference; but clearly forgot to.

If that would let all cursor themes work without a hitch, that would be a true solution. I unchecked my reply as “solution” to see whether anybody could tell us more about the package.

1 Like

Anything is possible. @cscs will likely know; or at least, remember the package name, so that you can investigate further.

I’m not sure I know what you are referring to.
Usually cursors are just a matter of setting/applying the theme.
That and if it is compatible.

It could simply be a question of DE+Toolkit+Theme.

But, assuming all thing could work … make sure to see the various ways to set the theme.

https://wiki.archlinux.org/title/Cursor_themes#Configuration

Xfce forum suggested fix for cursor inconsistencies:

Find name and size of cursor theme

xfconf-query -c xsettings -p /Gtk/CursorThemeName;
xfconf-query -c xsettings -p /Gtk/CursorThemeSize

and edit ~/.Xresources to add cursor theme name and size

cursor issue fix / Desktop / Xfce Forums

Xcursor.size: 48
Xcursor.theme: DMZ-Black

Manjaro forum suggested fix for systemwide:

System-wide application of specific cursor theme (Simple-and-Soft) - #5 by Rana

I only needed steps 2 and 3 for systemwide cursor theme

It was a comment you made a few weeks ago (possibly in passing); cursors were not specifically mentioned. Whatever it was, it seemed interesting enough at the time to think ‘I must remember that package’, which, I obviously didn’t.

All I recall now, is that the package was apparently useful somehow for GTK apps used in other DE’s; correcting theme-related issues, I suspect.

Not much to go on, I admit, especially if you don’t remember it. :laughing:

Thanks. But that one didn’t work for me unless what I did wasn’t right, which was:

  1. Use Settings > Mouse and Touchpad > Theme, so as to select the theme that gave me the problem, i.e. Breeze.

  2. Find out the information

[luna@jar ~]$ xfconf-query -c xsettings -p /Gtk/CursorThemeSize
0
[luna@jar ~]$ xfconf-query -c xsettings -p /Gtk/CursorThemeName;
xcursor-breeze
  1. Create (as it was not present) and populate file, resulting in:
[luna@jar ~]$ cat .Xresources
Xcursor.size: 0
Xcursor.theme: xcursor-breeze
  1. Reboot.

After those steps, problem persists.

That one I am unable to try. One of the steps is to create a bash file with a long list of links. I wouldn’t know how to come up with the links for my own case (I don’t understand how Rana there came up with his stuff).

Also his problem (“In some contexts I still get cursors of another theme”) seems different from mine. When I’m on Breeze, I get Breeze theme just fine. Only its “size” icon does not change to “text” when it should (i.e. over a text editor).

For now I am happy enough to use Adwaita.

Since some of the other replies may be a better solution, I will not choose a solution. Site admins, feel free to choose a solution for me.

Setting Xcursor.size to actual size displayed rather than 0 might help with cursor issues

Step 4 and additional symlinks are not needed if user selects:

I tried:

[luna@jar ~]$ xfconf-query --channel xsettings --property /Gtk/CursorThemeSize --set 16
[luna@jar ~]$ xfconf-query -c xsettings -p /Gtk/CursorThemeSize
16

But it was not a fix for me.

That was good to know. Therefore I tried the prior steps and found out the following.

If “Settings > Mouse and Touchpad > Theme” = Breeze, then:

  • /usr/share/icons/default/index.theme has Inherits=xcursor-breeze
  • /etc/lightdm/lightdm-gtk-greeter.conf has cursor-theme-name = xcursor-breeze

In short, my settings are already as Rana’s method would have them (and of course I still have the problem).

Interestingly enough, if I go “Settings > Mouse and Touchpad > Theme” = Adwaita, I still get xcursor-breeze in the two files. Therefore I assume that the (GUI) choice of Adwaita affected some configuration files other than the two mentoined by Rana. Thanks.

Cursor theme choice in Xfce is without effect