Compare commits

...

4 Commits

Author SHA1 Message Date
vaxerski
9b6960eb55 fix calculating stupid gdk surface offsets 2022-05-27 21:10:51 +02:00
vaxerski
4cda50399c [gha] bump flake inputs 2022-05-27 14:06:54 +00:00
vaxerski
daff7d8ca2 use xdg-shell v3 2022-05-27 16:05:25 +02:00
vaxerski
1bef63a1e6 fix for latest wlroots 2022-05-27 16:03:24 +02:00
4 changed files with 13 additions and 8 deletions

6
flake.lock generated
View File

@@ -26,11 +26,11 @@
"flake": false, "flake": false,
"locked": { "locked": {
"host": "gitlab.freedesktop.org", "host": "gitlab.freedesktop.org",
"lastModified": 1653502661, "lastModified": 1653658290,
"narHash": "sha256-unQ1j3jleghIMi340dJTJZZ1ffwm1cI7gaQbdKd7laE=", "narHash": "sha256-zZaona39DOZNL93A1KG3zAi8vDttJBirxacq24hWCn4=",
"owner": "wlroots", "owner": "wlroots",
"repo": "wlroots", "repo": "wlroots",
"rev": "1cb6b2cf673a5b580d7ad79ce2b37c14b14b0268", "rev": "75d31509db8c28e8379fe9570118ef8c82284581",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {

View File

@@ -67,7 +67,7 @@ CCompositor::CCompositor() {
m_sWLRScene = wlr_scene_create(); m_sWLRScene = wlr_scene_create();
wlr_scene_attach_output_layout(m_sWLRScene, m_sWLROutputLayout); wlr_scene_attach_output_layout(m_sWLRScene, m_sWLROutputLayout);
m_sWLRXDGShell = wlr_xdg_shell_create(m_sWLDisplay, 2); m_sWLRXDGShell = wlr_xdg_shell_create(m_sWLDisplay, 3);
m_sWLRCursor = wlr_cursor_create(); m_sWLRCursor = wlr_cursor_create();
wlr_cursor_attach_output_layout(m_sWLRCursor, m_sWLROutputLayout); wlr_cursor_attach_output_layout(m_sWLRCursor, m_sWLROutputLayout);

View File

@@ -23,8 +23,8 @@ void addPopupGlobalCoords(void* pPopup, int* x, int* y) {
auto curPopup = PPOPUP; auto curPopup = PPOPUP;
while (true) { while (true) {
px += curPopup->popup->geometry.x; px += curPopup->popup->current.geometry.x;
py += curPopup->popup->geometry.y; py += curPopup->popup->current.geometry.y;
if (curPopup->parentPopup) { if (curPopup->parentPopup) {
curPopup = curPopup->parentPopup; curPopup = curPopup->parentPopup;

View File

@@ -121,8 +121,13 @@ void CHyprXWaylandManager::sendCloseWindow(CWindow* pWindow) {
void CHyprXWaylandManager::setWindowSize(CWindow* pWindow, const Vector2D& size) { void CHyprXWaylandManager::setWindowSize(CWindow* pWindow, const Vector2D& size) {
if (pWindow->m_bIsX11) if (pWindow->m_bIsX11)
wlr_xwayland_surface_configure(pWindow->m_uSurface.xwayland, pWindow->m_vRealPosition.vec().x, pWindow->m_vRealPosition.vec().y, size.x, size.y); wlr_xwayland_surface_configure(pWindow->m_uSurface.xwayland, pWindow->m_vRealPosition.vec().x, pWindow->m_vRealPosition.vec().y, size.x, size.y);
else // vvvvv I don't know if this is fucking correct, but the fucking idea of putting shadows into a window's surface is borderline criminal. else {
wlr_xdg_toplevel_set_size(pWindow->m_uSurface.xdg->toplevel, size.x - pWindow->m_uSurface.xdg->current.geometry.x * 2, size.y - pWindow->m_uSurface.xdg->current.geometry.y * 2); // I don't know if this is fucking correct, but the fucking idea of putting shadows into a window's surface is borderline criminal.
const auto XDELTA = pWindow->m_uSurface.xdg->surface->current.width - pWindow->m_uSurface.xdg->current.geometry.width;
const auto YDELTA = pWindow->m_uSurface.xdg->surface->current.height - pWindow->m_uSurface.xdg->current.geometry.height;
wlr_xdg_toplevel_set_size(pWindow->m_uSurface.xdg->toplevel, size.x - XDELTA, size.y - YDELTA * 2);
}
} }
void CHyprXWaylandManager::setWindowStyleTiled(CWindow* pWindow, uint32_t edgez) { void CHyprXWaylandManager::setWindowStyleTiled(CWindow* pWindow, uint32_t edgez) {