mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-22 21:35:58 +01:00
more vlc fixes
This commit is contained in:
parent
f4148d1b24
commit
00eebae66c
6 changed files with 35 additions and 5 deletions
|
@ -156,6 +156,12 @@ void KeybindManager::toggleActiveWindowFullscreen(std::string unusedArg) {
|
||||||
|
|
||||||
PWINDOW->setFullscreen(!PWINDOW->getFullscreen());
|
PWINDOW->setFullscreen(!PWINDOW->getFullscreen());
|
||||||
g_pWindowManager->getWorkspaceByID(PWINDOW->getWorkspaceID())->setHasFullscreenWindow(PWINDOW->getFullscreen());
|
g_pWindowManager->getWorkspaceByID(PWINDOW->getWorkspaceID())->setHasFullscreenWindow(PWINDOW->getFullscreen());
|
||||||
|
|
||||||
|
// Fix windows over and below fullscreen.
|
||||||
|
if (PWINDOW->getFullscreen())
|
||||||
|
g_pWindowManager->setAllWorkspaceWindowsUnderFullscreen(g_pWindowManager->activeWorkspaces[MONITOR->ID]);
|
||||||
|
else
|
||||||
|
g_pWindowManager->setAllWorkspaceWindowsAboveFullscreen(g_pWindowManager->activeWorkspaces[MONITOR->ID]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeybindManager::toggleActiveWindowFloating(std::string unusedArg) {
|
void KeybindManager::toggleActiveWindowFloating(std::string unusedArg) {
|
||||||
|
|
|
@ -230,8 +230,6 @@ CWindow* Events::remapFloatingWindow(int windowID, int forcemonitor) {
|
||||||
g_pWindowManager->Values[0] = XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_FOCUS_CHANGE;
|
g_pWindowManager->Values[0] = XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_FOCUS_CHANGE;
|
||||||
xcb_change_window_attributes_checked(g_pWindowManager->DisplayConnection, windowID, XCB_CW_EVENT_MASK, g_pWindowManager->Values);
|
xcb_change_window_attributes_checked(g_pWindowManager->DisplayConnection, windowID, XCB_CW_EVENT_MASK, g_pWindowManager->Values);
|
||||||
|
|
||||||
g_pWindowManager->setFocusedWindow(windowID);
|
|
||||||
|
|
||||||
// Make all floating windows above
|
// Make all floating windows above
|
||||||
g_pWindowManager->setAllFloatingWindowsTop();
|
g_pWindowManager->setAllFloatingWindowsTop();
|
||||||
|
|
||||||
|
@ -403,6 +401,10 @@ void Events::eventMapWindow(xcb_generic_event_t* event) {
|
||||||
|
|
||||||
// Do ICCCM
|
// Do ICCCM
|
||||||
g_pWindowManager->getICCCMWMProtocols(pNewWindow);
|
g_pWindowManager->getICCCMWMProtocols(pNewWindow);
|
||||||
|
|
||||||
|
// Set not under
|
||||||
|
pNewWindow->setUnderFullscreen(false);
|
||||||
|
pNewWindow->setDirty(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::eventButtonPress(xcb_generic_event_t* event) {
|
void Events::eventButtonPress(xcb_generic_event_t* event) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "window.hpp"
|
#include "window.hpp"
|
||||||
#include "windowManager.hpp"
|
#include "windowManager.hpp"
|
||||||
|
|
||||||
CWindow::CWindow() { this->setIsSleeping(true); this->setFirstAnimFrame(true); this->setIsAnimated(false); this->setDead(false); this->setMasterChildIndex(0); this->setMaster(false); this->setCanKill(false); this->setImmovable(false); this->setNoInterventions(false); this->setDirty(true); this->setFullscreen(false); this->setIsFloating(false); this->setParentNodeID(0); this->setChildNodeAID(0); this->setChildNodeBID(0); this->setName(""); }
|
CWindow::CWindow() { this->setUnderFullscreen(false); this->setIsSleeping(true); this->setFirstAnimFrame(true); this->setIsAnimated(false); this->setDead(false); this->setMasterChildIndex(0); this->setMaster(false); this->setCanKill(false); this->setImmovable(false); this->setNoInterventions(false); this->setDirty(true); this->setFullscreen(false); this->setIsFloating(false); this->setParentNodeID(0); this->setChildNodeAID(0); this->setChildNodeBID(0); this->setName(""); }
|
||||||
CWindow::~CWindow() { }
|
CWindow::~CWindow() { }
|
||||||
|
|
||||||
void CWindow::generateNodeID() {
|
void CWindow::generateNodeID() {
|
||||||
|
|
|
@ -61,6 +61,7 @@ public:
|
||||||
// For floating
|
// For floating
|
||||||
EXPOSED_MEMBER(DefaultSize, Vector2D, vec);
|
EXPOSED_MEMBER(DefaultSize, Vector2D, vec);
|
||||||
EXPOSED_MEMBER(DefaultPosition, Vector2D, vec);
|
EXPOSED_MEMBER(DefaultPosition, Vector2D, vec);
|
||||||
|
EXPOSED_MEMBER(UnderFullscreen, bool, b);
|
||||||
|
|
||||||
// Monitors
|
// Monitors
|
||||||
EXPOSED_MEMBER(Monitor, int, i);
|
EXPOSED_MEMBER(Monitor, int, i);
|
||||||
|
|
|
@ -345,9 +345,9 @@ void CWindowManager::refreshDirtyWindows() {
|
||||||
bool bHasFullscreenWindow = getWorkspaceByID(window.getWorkspaceID())->getHasFullscreenWindow();
|
bool bHasFullscreenWindow = getWorkspaceByID(window.getWorkspaceID())->getHasFullscreenWindow();
|
||||||
|
|
||||||
// first and foremost, let's check if the window isn't on a hidden workspace
|
// first and foremost, let's check if the window isn't on a hidden workspace
|
||||||
// or that it is not a non-fullscreen window in a fullscreen workspace
|
// or that it is not a non-fullscreen window in a fullscreen workspace thats under
|
||||||
if (!isWorkspaceVisible(window.getWorkspaceID())
|
if (!isWorkspaceVisible(window.getWorkspaceID())
|
||||||
|| (bHasFullscreenWindow && !window.getFullscreen())) {
|
|| (bHasFullscreenWindow && !window.getFullscreen() && (window.getUnderFullscreen() || !window.getIsFloating()))) {
|
||||||
// Move it to hades
|
// Move it to hades
|
||||||
Values[0] = (int)1500000; // hmu when monitors actually have that many pixels
|
Values[0] = (int)1500000; // hmu when monitors actually have that many pixels
|
||||||
Values[1] = (int)1500000; // and we are still using xorg =)
|
Values[1] = (int)1500000; // and we are still using xorg =)
|
||||||
|
@ -1697,6 +1697,8 @@ void CWindowManager::moveWindowToMapped(int64_t id) {
|
||||||
unmappedWindows.push_back(t);
|
unmappedWindows.push_back(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
windows[windows.size() - 1].setUnderFullscreen(false);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1711,3 +1713,19 @@ bool CWindowManager::isWindowUnmapped(int64_t id) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CWindowManager::setAllWorkspaceWindowsAboveFullscreen(const int& workspace) {
|
||||||
|
for (auto& w : windows) {
|
||||||
|
if (w.getWorkspaceID() == workspace && w.getIsFloating()) {
|
||||||
|
w.setUnderFullscreen(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CWindowManager::setAllWorkspaceWindowsUnderFullscreen(const int& workspace) {
|
||||||
|
for (auto& w : windows) {
|
||||||
|
if (w.getWorkspaceID() == workspace && w.getIsFloating()) {
|
||||||
|
w.setUnderFullscreen(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -121,6 +121,9 @@ public:
|
||||||
void moveWindowToMapped(int64_t);
|
void moveWindowToMapped(int64_t);
|
||||||
bool isWindowUnmapped(int64_t);
|
bool isWindowUnmapped(int64_t);
|
||||||
|
|
||||||
|
void setAllWorkspaceWindowsAboveFullscreen(const int&);
|
||||||
|
void setAllWorkspaceWindowsUnderFullscreen(const int&);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Internal WM functions that don't have to be exposed
|
// Internal WM functions that don't have to be exposed
|
||||||
|
|
Loading…
Reference in a new issue