forked from quickshell/quickshell
		
	wayland: fix Qt 6.7 compatibility
This commit is contained in:
		
							parent
							
								
									98318c4dcb
								
							
						
					
					
						commit
						fd5b73adbb
					
				
					 2 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
					@ -7,6 +7,7 @@
 | 
				
			||||||
#include <private/qwaylandwindow_p.h>
 | 
					#include <private/qwaylandwindow_p.h>
 | 
				
			||||||
#include <qlogging.h>
 | 
					#include <qlogging.h>
 | 
				
			||||||
#include <qobject.h>
 | 
					#include <qobject.h>
 | 
				
			||||||
 | 
					#include <qtversionchecks.h>
 | 
				
			||||||
#include <qtypes.h>
 | 
					#include <qtypes.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "lock.hpp"
 | 
					#include "lock.hpp"
 | 
				
			||||||
| 
						 | 
					@ -88,7 +89,11 @@ void QSWaylandSessionLockSurface::ext_session_lock_surface_v1_configure(
 | 
				
			||||||
		this->configured = true;
 | 
							this->configured = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		this->window()->resizeFromApplyConfigure(this->size);
 | 
							this->window()->resizeFromApplyConfigure(this->size);
 | 
				
			||||||
 | 
					#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0)
 | 
				
			||||||
		this->window()->handleExpose(QRect(QPoint(), this->size));
 | 
							this->window()->handleExpose(QRect(QPoint(), this->size));
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
							this->window()->sendRecursiveExposeEvent();
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		if (this->visible) this->initVisible();
 | 
							if (this->visible) this->initVisible();
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		// applyConfigureWhenPossible runs too late and causes a protocol error on reconfigure.
 | 
							// applyConfigureWhenPossible runs too late and causes a protocol error on reconfigure.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,6 +10,7 @@
 | 
				
			||||||
#include <qpoint.h>
 | 
					#include <qpoint.h>
 | 
				
			||||||
#include <qrect.h>
 | 
					#include <qrect.h>
 | 
				
			||||||
#include <qsize.h>
 | 
					#include <qsize.h>
 | 
				
			||||||
 | 
					#include <qtversionchecks.h>
 | 
				
			||||||
#include <qtypes.h>
 | 
					#include <qtypes.h>
 | 
				
			||||||
#include <qwayland-wlr-layer-shell-unstable-v1.h>
 | 
					#include <qwayland-wlr-layer-shell-unstable-v1.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -86,7 +87,11 @@ void QSWaylandLayerSurface::zwlr_layer_surface_v1_configure(
 | 
				
			||||||
	if (!this->configured) {
 | 
						if (!this->configured) {
 | 
				
			||||||
		this->configured = true;
 | 
							this->configured = true;
 | 
				
			||||||
		this->window()->resizeFromApplyConfigure(this->size);
 | 
							this->window()->resizeFromApplyConfigure(this->size);
 | 
				
			||||||
 | 
					#if QT_VERSION < QT_VERSION_CHECK(6, 7, 0)
 | 
				
			||||||
		this->window()->handleExpose(QRect(QPoint(), this->size));
 | 
							this->window()->handleExpose(QRect(QPoint(), this->size));
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
							this->window()->sendRecursiveExposeEvent();
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		this->window()->applyConfigureWhenPossible();
 | 
							this->window()->applyConfigureWhenPossible();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue