ace-window icon indicating copy to clipboard operation
ace-window copied to clipboard

other-window in terminal mode

Open basaran opened this issue 3 years ago • 1 comments

Hello,

I ran into an issue where I have emacs running in server mode and I launch emacsclients in terminal mode.

When I try to ace-window from Terminal to GUI emacs, it works just fine. But when I try to switch from GUI emacs to terminal emacs, it doesn't work although the command goes through.

I made a video of the situation, and I also found out about x-send-client-message but I'm not sure where to add this to ace-window.

(defun raiseme ()
  (x-send-client-message
   nil                ; DISPLAY - nil is selected frame
   0                  ; DEST - 0 is root window of display
   nil                ; FROM - nil is selected frame
   "_NET_ACTIVE_WINDOW"    ; MESSAGE-TYPE - name of an Atom as a string
   32                 ; FORMAT  - size of the values in bits
   '(1 "_NET_WM_USER_TIME" 0) ; VALUES
   )
  )

ace-window.webm

basaran avatar Jul 07 '22 07:07 basaran

Hi. I've tried to debug your example, and found nothing that works in a good way. Neither select-frame-set-input-focus, nor select-frame, nor x-focus-frame. Actually the built-in other-frame command also doesn't work. I think you should raise an Emacs bug about this. It should be fixed in the core.

The only thing I can think of to make it work is stuff like wmctrl, but I don't want to include that dependency in ace-window.

abo-abo avatar Sep 11 '22 18:09 abo-abo