emacs-eaf / emacs-eaf/emacs-application-framework

eaf-pdf-viewer: switching to other frame when press any key in tear-off-window frame

Open
#1,031 2 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Python
Stars
3.5k
Forks
245
Avg merge
22h 20m
Merged PRs (30d)
1

Description

**Describe the bug**
eaf-pdf-viewer handles key press signal incorrectly in tear-off-window frame

**To Reproduce**
1. open emacs with only eaf loaded
> emacs -q -l init-eaf.el
2. load eaf-pdf-viewer module:
> (require 'eaf)
> (require 'eaf-pdf-viewer)
3. create a new frame using tear-off-window
> M-x dired-jump-other-window
> M-x tear-off-window
4. open a pdf file using eaf-pdf-viewer in new window (the one that teared off)
> M-x eaf-open; open minif.pdf
5. scroll the pdf view using hjkl keys. It is normal at first.
6. switch to other emacs frame (or other GUI window) and then switch back
7. scroll the pdf view again using hjkl keys: now any key press will turn you back to other emacs frame automatically, meanwhile the mouse scroll behave normally.

**Expected behavior**
pressing hjkl keys in eaf-pdf-viewer buffer should scroll the view, but not switch to other emacs frame

**Versions (please complete the following info):**
- Distro and DE/WM: KDE
- Versions of Dependencies:
- M-x emacs-version: 28.2

**Error logs**
Please check the `*eaf*` buffer, if there is any error in it, paste it here.

**Screenshots**
the eaf I used:
![image](https://user-images.githubusercontent.com/128990/202328773-24c2b941-b2de-411d-b1ab-0397736a6c7d.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.