-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't switch away from some workspaces with single X window #688
Comments
To my untrained ears, the description sounds similar to #617 (comment). If you look at the issue, I have linked to a screen-recording of the issue.
|
You may also consider sharing See |
@dto Do you have a multi-monitor setup or is |
I can confirm this bug. I have two workspaces on differen screens. Buffer firefox<2> is on workspace 0 and scratch is on workspace 1. When I try to switch from workspace 0 to 1 with function `exwm-workspace-switch' focus jump back to workspace 0. Here is attached xelb debug log, where I try to change workspace four times: Answers to second comment: Note: This happens only if frame with firefox has only one window. If I split frame into two windows (with at least one buffer which is not exwm) this doesn't happen. |
The problem is with the logs like:
I'm not sure why (advice-add #'exwm-input--on-buffer-list-update :before
(lambda (&rest r)
(exwm--log "CALL STACK: %s" (cddr (reverse (xcb-debug:-call-stack)))))) |
Here is the log with call stack: xelb.log |
I figured out something. If I have in configuration this snippet, which show me whenever JBoss is running, the problem is present when I try to change workspace with mouse click too.
If I put this out, the problem is only present when I call `exwm-workspace-switch' command interactively. |
@mobid From the logs it's clearly |
Thank you for solution. It works fine now. I was also modify
|
For me, the issue appears to be eyebrowse. Disabling eyebrowse fixes the issue. log[02:41:19] : CALL STACK: ((t exwm-input--on-buffer-list-update) (t run-hooks buffer-list-update-hook) (t get-buffer-create *temp*) (t generate-new-buffer *temp*) (t format-spec %s ((115 . 1) (116 . ))) (t eyebrowse-format-slot (1 (((min-height . 4) (min-width . 10) (min-height-ignore . 2) (min-width-ignore . 4) (min-height-safe . 1) (min-width-safe . 2) (min-pixel-height . 104) (min-pixel-width . 120) (min-pixel-height-ignore . 52) (min-pixel-width-ignore . 40) (min-pixel-height-safe . 26) (min-pixel-width-safe . 24)) leaf (pixel-width . 3840) (pixel-height . 3014) (total-width . 320) (total-height . 115) (normal-height . 1.0) (normal-width . 1.0) (buffer *spacemacs* (selected . t) (hscroll . 0) (fringes 8 8 nil nil) (margins nil) (scroll-bars nil 0 t nil 0 t nil) (vscroll . 0) (dedicated) (point . 29) (start . 1))) )) (t #[257 \211@\211\300U\203\0\301\202 \0\302\303 \304�\305\306\307\310\311\312� !\313"\314\315\316&�#\210\211\262�\317\320�!\321�\322��\323� \324\325\326��\327�&�\207 [1 eyebrowse-mode-line-active eyebrowse-mode-line-inactive make-sparse-keymap define-key [mode-line mouse-1] make-byte-code 257 \301\300!\207 vconcat vector [eyebrowse-switch-to-window-config] 3 |
Something strange: I fixed a separate issue where my modeline, doom, wasn't being updated by adding: (with-eval-after-load 'doom-modeline
(add-hook 'exwm-workspace-switch-hook #'doom-modeline-set-selected-window)) This appears to have fixed the problem. So I'm not sure where the problem is coming from. |
I have no clue what side effect |
@Stebalien, the reason is that eyebrowse invokes @Stebalien Please, test #737 with eyebrowse and report back. |
#737 looks overall good to me. Let's wait for feed backs from @Stebalien and @dto before it's merged. |
Sorry for the delay. I've tested #737 and, while it works, it doesn't fix the bug for me. |
Is there any workaround to this so far? |
@Stebalien Could you regenerate debug logs with #737 patched? @divansantana Which problem did you refer to? What other three users reported may not be the same thing after all. You may check if #737 works for you of course. |
@ch11ng This only happens with eyebrowse-mode in this scenario so far, no I'll test your patch as soon as I can. |
I've tried using this PR #737 with these two commits last in it. I still have the same issue described above. I've tried to enable debugging and attached it:
Let me know if you need anything else:
|
My eyebrowse config is pretty standard: (use-package eyebrowse
:ensure t
:pin melpa
:config
(setq-default eyebrowse-mode-line-style 'smart)
(exwm-input-set-key (kbd "s-1") #'eyebrowse-switch-to-window-config-1)
(exwm-input-set-key (kbd "s-2") #'eyebrowse-switch-to-window-config-2)
(exwm-input-set-key (kbd "s-3") #'eyebrowse-switch-to-window-config-3)
(exwm-input-set-key (kbd "s-4") #'eyebrowse-switch-to-window-config-4)
(eyebrowse-mode t)) |
Just as @medranocalvo have mentioned, the problem with eyebrowse is with the temp buffer generated during workspace switch. You may apply the following patch as a workaround, which unfortunately conflicts with #737 so for those already applied #737 you'll have to revert it first. We may end up with this as the solution if we can't come up with a better one. diff --git a/exwm-input.el b/exwm-input.el
index decfc8128..9074bd16e 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -1133,6 +1133,19 @@ One use is to access the keymap bound to KEYS (as prefix keys) in char-mode."
(unless (current-message)
(exwm-input--on-minibuffer-exit)))
+(defun exwm-input--ignore-temp-buffer (orig-fun &rest params)
+ "Set `exwm-input--skip-buffer-list-update' to ignore temp buffers."
+ (exwm--log)
+ (let ((exwm-input--skip-buffer-list-update
+ (equal " *temp*" (cond
+ ((stringp (car params))
+ (car params))
+ ((bufferp (car params))
+ (buffer-name (car params)))
+ (t
+ nil)))))
+ (apply orig-fun params)))
+
(defun exwm-input--init ()
"Initialize the keyboard module."
(exwm--log)
@@ -1178,6 +1191,8 @@ One use is to access the keymap bound to KEYS (as prefix keys) in char-mode."
(when mouse-autoselect-window
(xcb:+event exwm--connection 'xcb:EnterNotify
#'exwm-input--on-EnterNotify))
+ (advice-add 'generate-new-buffer :around #'exwm-input--ignore-temp-buffer)
+ (advice-add 'kill-buffer :around #'exwm-input--ignore-temp-buffer)
;; Control `exwm-input--during-command'
(add-hook 'pre-command-hook #'exwm-input--on-pre-command)
(add-hook 'post-command-hook #'exwm-input--on-post-command)
@@ -1199,6 +1214,8 @@ One use is to access the keymap bound to KEYS (as prefix keys) in char-mode."
"Exit the input module."
(exwm--log)
(exwm-input--unset-simulation-keys)
+ (advice-remove 'generate-new-buffer #'exwm-input--ignore-temp-buffer)
+ (advice-remove 'kill-buffer #'exwm-input--ignore-temp-buffer
(remove-hook 'pre-command-hook #'exwm-input--on-pre-command)
(remove-hook 'post-command-hook #'exwm-input--on-post-command)
(remove-hook 'minibuffer-setup-hook #'exwm-input--on-minibuffer-setup) |
Seem to have it isolated to:
Anything I can provide? |
I can confirm neither the above diff nor #737 resolve this for me. |
I switched to Emacs 27.1 (from Git head) and have a problem. When I try to switch to another workspace via Super-1/2/3 etc, when using whichever is the most recently started X window, the workspace switch happens for a split second and then I am pulled back to the original workspace with the X window. To be able to switch workspaces, I have to hide the X window first.
The text was updated successfully, but these errors were encountered: