masm11 / emacs

Mirror of GNU Emacs
http://www.gnu.org/software/emacs/
GNU General Public License v3.0
198 stars 14 forks source link

pdf-tools' arrow issue on X #58

Closed A6GibKm closed 3 years ago

A6GibKm commented 3 years ago

The behaviour of the pdf-tools arrow differs on X and Wayland. In X you see

image

while in Wayland the arrow does not have a shadow background.

Moreover, the arrow stays there after alt-tab

image

This was already informed at #51.

masm11 commented 3 years ago

while in Wayland the arrow does not have a shadow background.

Whether a window has a shadow is depend on the environment even if on X. I think it is not important.

the arrow stays there after alt-tab

What does your alt-tab do?

A6GibKm commented 3 years ago

Whether a window has a shadow is depend on the environment even if on X. I think it is not important.

I personally don't think this is a bug, as said in #51, I think it is better this way. But I do not know if this is related to the desktop environment/emacs/X vs Wayland/pdf-tools or if the developer had a clear intention.

What does your alt-tab do?

Switches to another window, in this case to a nautilus one. I will test later if moving the window also creates this behaviour.

masm11 commented 3 years ago

@A6GibKm

Switches to another window,

Only switching focus? Or the emacs window disappears?

A6GibKm commented 3 years ago

Only switching focus? Or the emacs window disappears?

I do not know exactly the difference, but I think it switches focus. Let me be more precise on ways of reproducing this on GNOME and X11. This was done on Fedora Silverblue 33 which uses GNOME 3.38, but I am sure the only relevant bit is GNOME+Xorg.

  1. Open a latex file and it correspondent pdf-tools buffer and a folder under nautilus, press alt-tab to switch to nautilus and the arrow will be still be there, note that the arrow dissapears after ~3s so this has to be done quickly.

  2. Under the same setting as before, instead of using alt-tab you can have both windows minimized and after the arrow appears, just drag the folder on top of the buffer, and the arrow will still appear.

  3. Under the same setting, just make the arrow appear and move the Emacs windows, the arrow won't follow the window.

masm11 commented 3 years ago

Under the same setting as before, instead of using alt-tab you can have both windows minimized and after the arrow appears, just drag the folder on top of the buffer, and the arrow will still appear.

How to drag it while both of nautilus and emacs windows are minimized? You mean dragging from desktop?

A6GibKm commented 3 years ago

My bad, I meant "while both windows are not maximized" so you are able to move one window on top of the other by dragging.

A6GibKm commented 3 years ago

I would like to screen record this, but I only know how to screenrecord under wayland.

EDIT: Actually...

https://imgur.com/a/NfVROY2

titaniumbones commented 3 years ago

Gnome has a built in screen recorder which should work for this.

On Sep. 24, 2020 10:58 a.m., Maximiliano notifications@github.com wrote:

I would like to screen record this, but I only know how to screenrecord under wayland.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/masm11/emacs/issues/58#issuecomment-698399394, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AACY6NEMPHTOFRSULR2FZO3SHNM7VANCNFSM4RX6WFRQ.

A6GibKm commented 3 years ago

The Silverblue base image does not come with it as far as I know. But the above edit has a imgur gif with the recording.

EDIT: Actually CTRL+Alt+Shift+R starts/stops screenrecording.

masm11 commented 3 years ago

thank you for the screen record. I understood.

My bad, I meant "while both windows are not maximized" so you are able to move one window on top of the other by dragging.

ok.

masm11 commented 3 years ago

On combination of X-build and GNOME(Xorg), the arrows seem to disappear when some of mouse events occur. I'll try to make pgtk emacs the same behavior. Please wait for a while.

A6GibKm commented 3 years ago

Are you sure it disappears on certain mouse events? It gives that impression but I am sure it is on a short timer.

masm11 commented 3 years ago

I am sure it is on a short timer.

I didn't think the possibility of a shorter timer. thanks.

masm11 commented 3 years ago

@A6GibKm Try #59. It is fixed in some cases.

A6GibKm commented 3 years ago

I am testing right now and I am not sure what changed. The arrow now disappears when passing the mouse over the title bar of Emacs (I am not sure any more if this is part of the intended behaviour) and it does not follow the window.

To be honest X is a pain and I don't use it at all, it might be the case that the arrow does not work at all on x11 on upstream emacs either.

masm11 commented 3 years ago

The arrow now disappears when passing the mouse over the title bar of Emacs (I am not sure any more if this is part of the intended behaviour)

It is also the behavior of X-build.

it does not follow the window.

On X-build, the arrow disappears when starting moving the window. But on pgtk, I can't get any events on starting moving the window. Instead, I get a event on ending moving the window. That is why the arrow stays while moving the window and disappears when ending moving the window.