mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 23:51:55 -07:00
window: reveal current from group on toplevel activate
This commit is contained in:
@@ -197,7 +197,16 @@ void CWindow::createToplevelHandle() {
|
|||||||
|
|
||||||
// handle events
|
// handle events
|
||||||
hyprListener_toplevelActivate.initCallback(
|
hyprListener_toplevelActivate.initCallback(
|
||||||
&m_phForeignToplevel->events.request_activate, [&](void* owner, void* data) { g_pCompositor->focusWindow(this); }, this, "Toplevel");
|
&m_phForeignToplevel->events.request_activate,
|
||||||
|
[&](void* owner, void* data) {
|
||||||
|
if (isHidden() && m_sGroupData.pNextWindow) {
|
||||||
|
// grouped, change the current to us
|
||||||
|
setGroupCurrent(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_pCompositor->focusWindow(this);
|
||||||
|
},
|
||||||
|
this, "Toplevel");
|
||||||
|
|
||||||
hyprListener_toplevelFullscreen.initCallback(
|
hyprListener_toplevelFullscreen.initCallback(
|
||||||
&m_phForeignToplevel->events.request_fullscreen,
|
&m_phForeignToplevel->events.request_fullscreen,
|
||||||
@@ -677,8 +686,7 @@ bool CWindow::opaque() {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
const auto EXTENTS = pixman_region32_extents(&m_uSurface.xdg->surface->opaque_region);
|
const auto EXTENTS = pixman_region32_extents(&m_uSurface.xdg->surface->opaque_region);
|
||||||
if (EXTENTS->x2 - EXTENTS->x1 >= m_uSurface.xdg->surface->current.buffer_width
|
if (EXTENTS->x2 - EXTENTS->x1 >= m_uSurface.xdg->surface->current.buffer_width && EXTENTS->y2 - EXTENTS->y1 >= m_uSurface.xdg->surface->current.buffer_height)
|
||||||
&& EXTENTS->y2 - EXTENTS->y1 >= m_uSurface.xdg->surface->current.buffer_height)
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user