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

Set floating and fullscreen window to non dedicated. #100

Open
WuuBoLin opened this issue Dec 21, 2024 · 2 comments
Open

Set floating and fullscreen window to non dedicated. #100

WuuBoLin opened this issue Dec 21, 2024 · 2 comments

Comments

@WuuBoLin
Copy link

Is there a specific reason why floating and fullscreen windows are set as dedicated windows?
Popup windows cannot be displayed when spawned from a floating window because exwm-layout--refresh-other calls switch-to-prev-buffer.

I encountered this issue while using VMware Workstation and Virt-manager within exwm. For example, when creating a new VM (which opens in a floating window) and trying to select a local ISO file, the file chooser dialog cannot be shown because it's another floating window.

Removing all instances of (set-window-dedicated-p window t) resolves this issue.

@Stebalien
Copy link
Contributor

The window is dedicated because there's only supposed to be one X window per floating frame. However, that shouldn't prevent a floating window from spawning a floating window (I've tested it with other applications and it works just fine).

Looking at exwm-layout--refresh, we should be calling exwm-layout--refresh-floating in this case. exwm-layout--refresh-other exists to support non-EXWM frames (terminal clients, etc.).

It sounds like there may be some form of race condition here where the frame ID isn't getting set? Can you enable exwm-debug-mode, reproduce this issue, then post the contents of your *XELB-DEBUG* buffer?

@WuuBoLin
Copy link
Author

WuuBoLin commented Jan 3, 2025

Here is a *XELB-DEBUG* buffer showing an example of clicking the browse button when selecting an ISO image in VMware Workstation

[00:05:02]exwm-input--on-buffer-list-update:	current-buffer=#<buffer Vmware<2>> selected-window=#<window 52 on Vmware<2>>
[00:05:02]exwm-layout--refresh:	frame=#<frame Vmware 0x62eb81a04bb8>
[00:05:02]exwm-layout--refresh-workspace:	Refresh workspace #<frame Vmware 0x62eb81a04bb8>
[00:05:02]exwm-layout--show:	Show #x1200007 in #<window 3 on Vmware>
[00:05:02]exwm--set-geometry:	Setting #x1200007 to 2532x1237+0+0
[00:05:02]exwm-layout--set-state:	id=#x1200007
[00:05:02]exwm-layout--set-client-list-stacking:	
[00:05:02]exwm-layout--refresh:	frame=#<frame Vmware 0x62eb81a04bb8>
[00:05:02]exwm-layout--refresh-workspace:	Refresh workspace #<frame Vmware 0x62eb81a04bb8>
[00:05:02]exwm-layout--show:	Show #x1200007 in #<window 3 on Vmware>
[00:05:02]exwm--set-geometry:	Setting #x1200007 to 2532x1237+0+0
[00:05:02]exwm-layout--set-state:	id=#x1200007
[00:05:02]exwm-layout--set-client-list-stacking:	
[00:05:02]exwm-input--update-focus:	focus-window=#<window 52 on Vmware<2>> focus-buffer=Vmware<2>
[00:05:02]exwm-input--update-focus:	Set focus on #x1201dcd
[00:05:02]exwm-manage--on-UnmapNotify:	id=#x400b86
[00:05:02]exwm-manage--unmanage-window:	Unmanage #x400b86 (buffer: nil, widthdraw: t)
[00:05:02]exwm--on-PropertyNotify:	atom=WM_STATE(251)
[00:05:02]exwm--on-PropertyNotify:	Unhandled: WM_STATE(251)
[00:05:02]exwm-input--on-PropertyNotify:	
[00:05:02]exwm--on-PropertyNotify:	atom=_NET_WM_STATE(286)
[00:05:02]exwm--on-PropertyNotify:	Unhandled: _NET_WM_STATE(286)
[00:05:02]exwm-input--on-PropertyNotify:	
[00:05:02]exwm--on-PropertyNotify:	atom=WM_STATE(251)
[00:05:02]exwm--on-PropertyNotify:	Unhandled: WM_STATE(251)
[00:05:02]exwm-input--on-PropertyNotify:	
[00:05:02]exwm--on-PropertyNotify:	atom=_NET_WM_STATE(286)
[00:05:02]exwm--on-PropertyNotify:	Unhandled: _NET_WM_STATE(286)
[00:05:02]exwm-input--on-PropertyNotify:	
[00:05:02]exwm-input--set-focus:	#x600036 (corrected) => #x1201dcd
[00:05:02]exwm-input--update-timestamp:	
[00:05:02]exwm--on-PropertyNotify:	atom=_TIME(469)
[00:05:02]exwm-input--on-PropertyNotify:	
[00:05:02]exwm-input--set-active-window:	
[00:05:04]exwm-input--on-ButtonPress:	major-mode=exwm-mode buffer=Vmware<2>
[00:05:04]exwm-input--mimic-read-event:	
[00:05:04]exwm-input--on-ButtonPress-line-mode:	down-mouse-1
[00:05:04]exwm--on-PropertyNotify:	atom=_NET_WM_USER_TIME(294)
[00:05:04]exwm-input--on-PropertyNotify:	
[00:05:04]exwm-layout--refresh:	frame=#<frame Vmware 0x62eb81a04bb8>
[00:05:04]exwm-layout--refresh-workspace:	Refresh workspace #<frame Vmware 0x62eb81a04bb8>
[00:05:04]exwm-layout--show:	Show #x1200007 in #<window 3 on Vmware>
[00:05:04]exwm--set-geometry:	Setting #x1200007 to 2532x1236+0+0
[00:05:04]exwm-layout--set-state:	id=#x1200007
[00:05:04]exwm-layout--set-client-list-stacking:	
[00:05:04]exwm-layout--refresh:	frame=#<frame Vmware 0x62eb81a04bb8>
[00:05:04]exwm-layout--refresh-workspace:	Refresh workspace #<frame Vmware 0x62eb81a04bb8>
[00:05:04]exwm-layout--show:	Show #x1200007 in #<window 3 on Vmware>
[00:05:04]exwm--set-geometry:	Setting #x1200007 to 2532x1236+0+0
[00:05:04]exwm-layout--set-state:	id=#x1200007
[00:05:04]exwm-layout--set-client-list-stacking:	
[00:05:04]exwm--on-PropertyNotify:	atom=WM_STATE(251)
[00:05:04]exwm--on-PropertyNotify:	Unhandled: WM_STATE(251)
[00:05:04]exwm-input--on-PropertyNotify:	
[00:05:04]exwm--on-PropertyNotify:	atom=_NET_WM_STATE(286)
[00:05:04]exwm--on-PropertyNotify:	Unhandled: _NET_WM_STATE(286)
[00:05:04]exwm-input--on-PropertyNotify:	
[00:05:04]exwm--on-PropertyNotify:	atom=WM_STATE(251)
[00:05:04]exwm--on-PropertyNotify:	Unhandled: WM_STATE(251)
[00:05:04]exwm-input--on-PropertyNotify:	
[00:05:04]exwm--on-PropertyNotify:	atom=_NET_WM_STATE(286)
[00:05:04]exwm--on-PropertyNotify:	Unhandled: _NET_WM_STATE(286)
[00:05:04]exwm-input--on-PropertyNotify:	
[00:05:04]exwm--on-PropertyNotify:	atom=_NET_WM_OPAQUE_REGION(391)
[00:05:04]exwm--on-PropertyNotify:	Unhandled: _NET_WM_OPAQUE_REGION(391)
[00:05:04]exwm-input--on-PropertyNotify:	
[00:05:04]exwm--on-ClientMessage:	atom=_NET_WM_STATE(286) id=#x1204093 data=(0 326 0 1 0)
[00:05:04]exwm-manage--on-ConfigureRequest:	
[00:05:04]exwm-manage--on-ConfigureRequest:	#x1204093 (#x40) @2532x1237+0+0; border-width: 0; sibling: #x0; stack-mode: 0
[00:05:04]exwm-manage--on-ConfigureRequest:	ConfigureWindow (preserve geometry)
[00:05:04]exwm-manage--on-MapRequest:	id=#x1204093 parent=#xfd
[00:05:04]exwm-manage--on-MapRequest:	#x1204093
[00:05:04]exwm-manage--manage-window:	Try to manage #x1204093
[00:05:04]exwm--update-window-type:	#x1204093
[00:05:04]exwm--update-class:	#x1204093
[00:05:04]exwm--update-transient-for:	#x1204093
[00:05:04]exwm--update-normal-hints:	#x1204093
[00:05:04]exwm--update-hints:	#x1204093
[00:05:04]exwm-manage--update-geometry:	id=#x1204093
[00:05:04]exwm-manage--update-mwm-hints:	id=#x1204093
[00:05:04]exwm--update-title:	#x1204093
[00:05:04]exwm--update-utf8-title:	#x1204093
[00:05:04]exwm--update-ctext-title:	#x1204093
[00:05:04]exwm--update-protocols:	#x1204093
[00:05:04]exwm-manage--get-configurations:	
[00:05:04]exwm-manage--manage-window:	Manage #x1204093
[00:05:04]exwm-manage--set-client-list:	
[00:05:04]exwm-workspace--x-create-frame:	
[00:05:04]exwm-workspace--on-after-make-frame:	Frame `#<frame *scratch* 0x62eb9224d050>' is floating
[00:05:04]exwm-manage--add-frame:	frame=#<frame *scratch* 0x62eb9224d050>
[00:05:04]exwm-input--on-buffer-list-update:	current-buffer=#<buffer  *temp*> selected-window=#<window 54 on *scratch*>
[00:05:04]exwm-input--on-buffer-list-update:	current-buffer=#<buffer Vmware<2>> selected-window=#<window 54 on Vmware<2>>
[00:05:04]exwm-layout--refresh:	frame=#<frame Vmware<2> 0x62eb9224d050>
[00:05:04]exwm-layout--refresh-other:	Refresh other #<frame Vmware<2> 0x62eb9224d050>
[00:05:04]exwm-layout--refresh:	frame=#<frame Vmware<2> 0x62eb9224d050>
[00:05:04]exwm-layout--refresh-other:	Refresh other #<frame Vmware<2> 0x62eb9224d050>
  backtrace()
  #f(compiled-function (&rest _) #<bytecode -0x1e113ed82315d57c>)(error (error "Window #<window 54 on Vmware<2>> is dedicated to b..."))
  error("Window %s is dedicated to buffer %s" #<window 54 on Vmware<2>> #<buffer Vmware<2>>)
  switch-to-prev-buffer(#<window 54 on Vmware<2>>)
  exwm-layout--refresh-other(#<frame Vmware<2> 0x62eb9224d050>)
  exwm-layout--refresh()
  redisplay_internal\ \(C\ function\)()
  exwm-floating--set-floating(18890899)
  exwm-manage--manage-window(18890899)
  exwm-manage--on-MapRequest([20 0 58 15 253 0 0 0 147 64 32 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] nil)
  #f(compiled-function (conn) "Process cached events." #<bytecode -0x1a6b863c5b3f05ac>)(#<xcb:connection xcb:connection-18bae06f7c0a>)
  apply(#f(compiled-function (conn) "Process cached events." #<bytecode -0x1a6b863c5b3f05ac>) #<xcb:connection xcb:connection-18bae06f7c0a> nil)
  xcb:-process-events(#<xcb:connection xcb:connection-18bae06f7c0a>)
  xcb:-connection-filter(#<process XELB> "\241 :\17\223@ \1\36\1\0\0\0\0\0\0F\1\0\0\0\0\0\0\1\0\0\0\0\0\0\0\27\0:\17\375\0\0\0\223@ \1\0\0\0\0\0\0...")
  #<subr read-event>(nil t 2)
  exwm-input--call-with-passthrough(#<subr read-event> nil t 2)
  apply(exwm-input--call-with-passthrough #<subr read-event> (nil t 2))
  read-event(nil t 2)
  sit-for(2)
  #f(compiled-function () #<bytecode -0xd2f2750b5fbec02>)()
  apply(#f(compiled-function () #<bytecode -0xd2f2750b5fbec02>) nil)
  timer-event-handler([t 26487 38067 886082 nil #f(compiled-function () #<bytecode -0xd2f2750b5fbec02>) nil nil 357000 nil])
[00:05:04]exwm-layout--refresh:	frame=#<frame Vmware 0x62eb81a04bb8>
[00:05:04]exwm-layout--refresh-workspace:	Refresh workspace #<frame Vmware 0x62eb81a04bb8>
[00:05:04]exwm-layout--show:	Show #x1200007 in #<window 3 on Vmware>
[00:05:04]exwm--set-geometry:	Setting #x1200007 to 2532x1237+0+0
[00:05:04]exwm-layout--set-state:	id=#x1200007
[00:05:04]exwm-layout--hide:	Hide #x1204093
[00:05:04]exwm-layout--set-state:	id=#x1204093
[00:05:04]exwm-layout--set-client-list-stacking:	
[00:05:04]exwm-layout--refresh:	frame=#<frame Vmware 0x62eb81a04bb8>
[00:05:04]exwm-layout--refresh-workspace:	Refresh workspace #<frame Vmware 0x62eb81a04bb8>
[00:05:04]exwm-layout--show:	Show #x1200007 in #<window 3 on Vmware>
[00:05:04]exwm--set-geometry:	Setting #x1200007 to 2532x1237+0+0
[00:05:04]exwm-layout--set-state:	id=#x1200007
[00:05:04]exwm-layout--set-client-list-stacking:	
[00:05:04]exwm-layout--refresh:	frame=#<frame Vmware<2> 0x62eb9224d050>
[00:05:04]exwm-layout--refresh-other:	Refresh other #<frame Vmware<2> 0x62eb9224d050>
[00:05:04]exwm-layout--refresh:	frame=#<frame Vmware<2> 0x62eb9224d050>
[00:05:04]exwm-layout--refresh-other:	Refresh other #<frame Vmware<2> 0x62eb9224d050>
[00:05:04]exwm-input--update-focus:	focus-window=#<window 54 on Vmware<2>> focus-buffer=Vmware<2>
[00:05:04]exwm-input--update-focus:	Set focus on #x1201dcd
[00:05:04]exwm--on-ClientMessage:	atom=_NET_WM_STATE(286) id=#x4031b7 data=(0 328 0 1 0)
[00:05:04]exwm--on-ClientMessage:	atom=_NET_WM_STATE(286) id=#x4031b7 data=(0 329 0 1 0)
[00:05:04]exwm--on-ClientMessage:	atom=_NET_WM_STATE(286) id=#x4031b7 data=(0 326 0 1 0)
[00:05:04]exwm--on-ClientMessage:	atom=_NET_WM_STATE(286) id=#x4031b7 data=(0 326 0 1 0)
[00:05:04]exwm--on-PropertyNotify:	atom=WM_STATE(251)
[00:05:04]exwm--on-PropertyNotify:	Unhandled: WM_STATE(251)
[00:05:04]exwm-input--on-PropertyNotify:	
[00:05:04]exwm--on-PropertyNotify:	atom=_NET_WM_STATE(286)
[00:05:04]exwm--on-PropertyNotify:	Unhandled: _NET_WM_STATE(286)
[00:05:04]exwm-input--on-PropertyNotify:	
[00:05:04]exwm--on-PropertyNotify:	atom=WM_STATE(251)
[00:05:04]exwm--on-PropertyNotify:	Unhandled: WM_STATE(251)
[00:05:04]exwm-input--on-PropertyNotify:	
[00:05:04]exwm--on-PropertyNotify:	atom=_NET_WM_STATE(286)
[00:05:04]exwm--on-PropertyNotify:	Unhandled: _NET_WM_STATE(286)
[00:05:04]exwm-input--on-PropertyNotify:	
[00:05:04]exwm--on-PropertyNotify:	atom=WM_STATE(251)
[00:05:04]exwm--on-PropertyNotify:	Unhandled: WM_STATE(251)
[00:05:04]exwm-input--on-PropertyNotify:	
[00:05:04]exwm--on-PropertyNotify:	atom=_NET_WM_STATE(286)
[00:05:04]exwm--on-PropertyNotify:	Unhandled: _NET_WM_STATE(286)
[00:05:04]exwm-input--on-PropertyNotify:	
[00:05:04]exwm-input--set-focus:	#x1201dcd (corrected) => #x1201dcd
[00:05:05]exwm--on-PropertyNotify:	atom=_NET_WM_OPAQUE_REGION(391)
[00:05:05]exwm--on-PropertyNotify:	Unhandled: _NET_WM_OPAQUE_REGION(391)
[00:05:05]exwm-input--on-PropertyNotify:	
[00:05:07]exwm-input--on-KeyPress:	major-mode=exwm-mode buffer=Vmware<2>
[00:05:07]exwm-input--on-KeyPress-line-mode:	(65513 . 1)
[00:05:07]exwm--on-PropertyNotify:	atom=_NET_WM_USER_TIME(294)
[00:05:07]exwm-input--on-PropertyNotify:	
[00:05:08]exwm-input--on-KeyPress:	major-mode=exwm-mode buffer=Vmware<2>
[00:05:08]exwm-input--on-KeyPress-line-mode:	(120 . 3)
[00:05:08]exwm-input--mimic-read-event:	
[00:05:08]exwm-input--cache-event:	134217848
[00:05:08]exwm-input--on-buffer-list-update:	current-buffer=#<buffer  *Minibuf-1*> selected-window=#<window 4 on  *Minibuf-1*>
[00:05:08]exwm-layout--on-minibuffer-setup:	
[00:05:08]exwm-input--update-focus:	focus-window=#<window 4 on  *Minibuf-1*> focus-buffer= *Minibuf-1*
[00:05:08]exwm-input--update-focus:	Focus on #<window 4 on  *Minibuf-1*>
[00:05:08]exwm-input--set-active-window:	
[00:05:08]exwm--on-ClientMessage:	atom=_NET_WM_STATE(286) id=#x400b86 data=(0 326 0 1 0)
[00:05:08]exwm--on-ClientMessage:	atom=_NET_WM_STATE(286) id=#x400b86 data=(0 326 0 1 0)
[00:05:08]exwm-input--on-buffer-list-update:	current-buffer=#<buffer Vmware> selected-window=#<window 3 on Vmware>
[00:05:08]exwm-input--on-buffer-list-update:	current-buffer=#<buffer Vmware> selected-window=#<window 3 on Vmware>
[00:05:08]exwm-input--on-buffer-list-update:	current-buffer=#<buffer Vmware<2>> selected-window=#<window 52 on Vmware<2>>
[00:05:08]exwm-input--on-buffer-list-update:	current-buffer=#<buffer Vmware<2>> selected-window=#<window 52 on Vmware<2>>

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

2 participants