Skip to content
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

Browser "share other window" doesn't work in EXWM #785

Closed
WorldsEndless opened this issue Oct 8, 2020 · 10 comments
Closed

Browser "share other window" doesn't work in EXWM #785

WorldsEndless opened this issue Oct 8, 2020 · 10 comments

Comments

@WorldsEndless
Copy link

This might be part of other issues, but I don't even know where to start in seeking a solution here. Here's how it works:

With my laptop connected to an external monitor, for two screens:

  1. Browser-based video meeting in EXWM (Firefox or Chrome, Zoom or Google Meet).
  2. "Share Screen" -> "Select a Screen or Window": only options are browser windows or "Entire Screen"

Compare:

  1. Browser-based video meeting in KDE (Firefox or Chrome, Zoom or Google Meet).
  2. "Share Screen" -> "Select a Screen or Window": every window and screen are on the list

So in EXWM I can't share, e.g., just an emacs window to show my code; I have to share it all. But this isn't the case in other WMs. Can I fix this somehow?

@WJCFerguson
Copy link
Contributor

(Just noting that as a very partial workaround, under the Advanced tab on Zoom you can also select an area to share)

@WorldsEndless
Copy link
Author

WorldsEndless commented Oct 13, 2020 via email

@dakra
Copy link

dakra commented Oct 13, 2020

Just want to add that this is not a fair comparison. In other window managers you also can not share only a single window in your Emacs frame. You either share the complete Emacs app or not. Same with exwm (where Emacs is simply everywhere).

In those cases I simply start a new Emacs instance inside exwm. If you put it in char-mode it works really well and you only realize you're in another Emacs inside Emacs when looking at the double modeline.

@WorldsEndless
Copy link
Author

@dakra is completely right, about both the diagnosis and the solution. I have a blog post about this coming up: create emacs-in-emacs and use the char-mode to keep your commands straight. Downright beautiful.

@medranocalvo
Copy link
Collaborator

See also #723.

As @dakra comments, this is a feature that all Emacs users, EXWM or not, could use. I suggest you to report a feature request to Emacs.

@WorldsEndless
Copy link
Author

WorldsEndless commented Oct 19, 2020 via email

@WorldsEndless
Copy link
Author

My post regarding this solution here: https://tech.toryanderson.com/2020/10/19/emacs-in-emacs-a-triumph-for-exwm/

@medranocalvo
Copy link
Collaborator

@WorldsEndless, M-x report-emacs-bug is O.K., despite the name. Actually, sending an e-mail to bug-gnu-emacs@gnu.org should be enough. Let me know if you encounter difficulties, or ask in emacs-devel@gnu.org.

BTW, your posts about EXWM are great, thank you!

@medranocalvo
Copy link
Collaborator

Forgot to ask you to post the bug number (pref. with a link) to #723, so that we can keep track. Thank you in advance.

@quotuva
Copy link

quotuva commented Jun 15, 2023

I've been using the following for this:

(defun my/toggle-frame-present nil
  "When run in an EXWM (browser) window, split screen into 2 frames
so that the normal Emacs one (on the right) can be screen-shared
from the other. Running again toggles back."
  (interactive)
  (unless (derived-mode-p 'exwm-mode)
    (user-error "Not in EXWM window"))
  (exwm-floating-toggle-floating)
  (if exwm--floating-frame
      ;; From exwm-floating-move
      (let ((floating-container (frame-parameter exwm--floating-frame
						 'exwm-container))
	    (width (/ (display-pixel-width) 2)))
	(exwm--log "Aligning to left half")
	(exwm--set-geometry floating-container 0 0 width nil)
	(exwm--set-geometry exwm--id 0 0 width nil)
	(xcb:flush exwm--connection)
	(other-frame 1)
	(set-frame-width (selected-frame) width nil t)
	(set-frame-position (selected-frame) width 0))
    (set-frame-width (selected-frame) (display-pixel-width) nil t)
    (set-frame-position (selected-frame) 0 0)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants