forked from quickshell/quickshell
		
	window: fix empty masks not applying
This commit is contained in:
		
							parent
							
								
									7a15495e3f
								
							
						
					
					
						commit
						8cf0659444
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
#include "proxywindow.hpp"
 | 
					#include "proxywindow.hpp"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <qnamespace.h>
 | 
				
			||||||
#include <qobject.h>
 | 
					#include <qobject.h>
 | 
				
			||||||
#include <qqmlengine.h>
 | 
					#include <qqmlengine.h>
 | 
				
			||||||
#include <qqmllist.h>
 | 
					#include <qqmllist.h>
 | 
				
			||||||
| 
						 | 
					@ -215,6 +216,12 @@ void ProxyWindowBase::updateMask() {
 | 
				
			||||||
			auto windowRegion = QRegion(QRect(0, 0, this->width(), this->height()));
 | 
								auto windowRegion = QRegion(QRect(0, 0, this->width(), this->height()));
 | 
				
			||||||
			mask = this->mMask->applyTo(windowRegion);
 | 
								mask = this->mMask->applyTo(windowRegion);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (mask.isEmpty()) {
 | 
				
			||||||
 | 
								this->window->setFlag(Qt::WindowTransparentForInput, true);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							this->window->setFlag(Qt::WindowTransparentForInput, false);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	this->window->setMask(mask);
 | 
						this->window->setMask(mask);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue