Honor value-mask field in ConfigureRequest event
				
					
				
			Some applications (e.g. JNLP) don't set correct values for fields not mentioned in `value-mask`. This commit corrects this bug together with another Java AWT specific problem.
This commit is contained in:
		
							parent
							
								
									dba43b018d
								
							
						
					
					
						commit
						7bfd429d52
					
				
					 1 changed files with 10 additions and 10 deletions
				
			
		|  | @ -71,7 +71,8 @@ corresponding buffer.") | ||||||
|                   (memq xcb:Atom:_NET_WM_WINDOW_TYPE_DIALOG exwm-window-type) |                   (memq xcb:Atom:_NET_WM_WINDOW_TYPE_DIALOG exwm-window-type) | ||||||
|                   (memq xcb:Atom:_NET_WM_WINDOW_TYPE_NORMAL exwm-window-type))) |                   (memq xcb:Atom:_NET_WM_WINDOW_TYPE_NORMAL exwm-window-type))) | ||||||
|              ;; For Java applications |              ;; For Java applications | ||||||
|              (and exwm-instance-name |              (and (memq xcb:Atom:_NET_WM_WINDOW_TYPE_NORMAL exwm-window-type) | ||||||
|  |                   exwm-instance-name | ||||||
|                   (string-prefix-p "sun-awt-X11-" exwm-instance-name) |                   (string-prefix-p "sun-awt-X11-" exwm-instance-name) | ||||||
|                   (not (string-suffix-p "XFramePeer" exwm-instance-name)))) |                   (not (string-suffix-p "XFramePeer" exwm-instance-name)))) | ||||||
|         (exwm--log "No need to manage #x%x" id) |         (exwm--log "No need to manage #x%x" id) | ||||||
|  | @ -274,9 +275,11 @@ corresponding buffer.") | ||||||
|   (let ((obj (make-instance 'xcb:ConfigureRequest)) |   (let ((obj (make-instance 'xcb:ConfigureRequest)) | ||||||
|         buffer edges) |         buffer edges) | ||||||
|     (xcb:unmarshal obj data) |     (xcb:unmarshal obj data) | ||||||
|     (with-slots (window x y width height border-width) obj |     (with-slots (stack-mode window sibling x y width height border-width | ||||||
|       (exwm--log "ConfigureRequest from #x%x @%dx%d%+d%+d, border: %d" |                             value-mask) | ||||||
|                  window width height x y border-width) |         obj | ||||||
|  |       (exwm--log "ConfigureRequest from #x%x (#x%x) @%dx%d%+d%+d, border: %d" | ||||||
|  |                  value-mask window width height x y border-width) | ||||||
|       (if (setq buffer (exwm--id->buffer window)) |       (if (setq buffer (exwm--id->buffer window)) | ||||||
|           ;; Send client message for managed windows |           ;; Send client message for managed windows | ||||||
|           (with-current-buffer buffer |           (with-current-buffer buffer | ||||||
|  | @ -308,13 +311,10 @@ corresponding buffer.") | ||||||
|         (xcb:+request exwm--connection |         (xcb:+request exwm--connection | ||||||
|             (make-instance 'xcb:ConfigureWindow |             (make-instance 'xcb:ConfigureWindow | ||||||
|                            :window window |                            :window window | ||||||
|                            :value-mask (logior xcb:ConfigWindow:X |                            :value-mask value-mask | ||||||
|                                                xcb:ConfigWindow:Y |  | ||||||
|                                                xcb:ConfigWindow:Width |  | ||||||
|                                                xcb:ConfigWindow:Height |  | ||||||
|                                                xcb:ConfigWindow:BorderWidth) |  | ||||||
|                            :x x :y y :width width :height height |                            :x x :y y :width width :height height | ||||||
|                            :border-width border-width))))) |                            :border-width border-width | ||||||
|  |                            :sibling sibling :stack-mode stack-mode))))) | ||||||
|   (xcb:flush exwm--connection)) |   (xcb:flush exwm--connection)) | ||||||
| 
 | 
 | ||||||
| (defun exwm-manage--on-MapRequest (data synthetic) | (defun exwm-manage--on-MapRequest (data synthetic) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue