diff --git a/CHANGELOG.md b/CHANGELOG.md index 2824b350..7dd9cd98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- Prevent *status_bar* and *window borders* from displaying in native fullscreen spaces [#71](https://github.com/koekeishiya/yabai/issues/71) ## [1.0.2] - 2019-06-25 ### Changed diff --git a/src/bar.c b/src/bar.c index fef610db..7577a55e 100644 --- a/src/bar.c +++ b/src/bar.c @@ -321,7 +321,7 @@ void bar_create(struct bar *bar) buf_push(bar->space_icon_strip, space_line); } - uint32_t tags[2] = { + uint32_t set_tags[2] = { kCGSStickyTagBit | kCGSModalWindowTagBit | kCGSDisableShadowTagBit | @@ -329,6 +329,9 @@ void bar_create(struct bar *bar) kCGSIgnoreForExposeTagBit }; + uint32_t clear_tags[2] = { 0, 0 }; + *((int8_t *)(clear_tags) + 0x5) = *((int8_t *)(clear_tags) + 0x5) | 0x20; + CFTypeRef frame_region; CGRect bounds = display_bounds(display_manager_main_display_id()); bar->frame = (CGRect) {{0,0},{bounds.size.width, 26}}; @@ -338,7 +341,8 @@ void bar_create(struct bar *bar) CFRelease(frame_region); SLSSetWindowResolution(g_connection, bar->id, 2.0f); - SLSSetWindowTags(g_connection, bar->id, tags, 32); + SLSSetWindowTags(g_connection, bar->id, set_tags, 64); + SLSClearWindowTags(g_connection, bar->id, clear_tags, 64); SLSSetWindowOpacity(g_connection, bar->id, 0); SLSSetMouseEventEnableFlags(g_connection, bar->id, false); SLSSetWindowLevel(g_connection, bar->id, CGWindowLevelForKey(4)); diff --git a/src/border.c b/src/border.c index cc5fce38..68dfc9fc 100644 --- a/src/border.c +++ b/src/border.c @@ -213,16 +213,20 @@ void border_window_create(struct ax_window *window) CGRect frame = window_frame(window); CGSNewRegionWithRect(&frame, &frame_region); - uint32_t tags[2] = { + uint32_t set_tags[2] = { kCGSModalWindowTagBit | kCGSDisableShadowTagBit | kCGSHighQualityResamplingTagBit | kCGSIgnoreForExposeTagBit }; + uint32_t clear_tags[2] = { 0, 0 }; + *((int8_t *)(clear_tags) + 0x5) = *((int8_t *)(clear_tags) + 0x5) | 0x20; + SLSNewWindow(g_connection, 2, 0.0f, 0.0f, frame_region, &border->id); SLSSetWindowResolution(g_connection, border->id, 2.0f); - SLSSetWindowTags(g_connection, border->id, tags, 32); + SLSSetWindowTags(g_connection, border->id, set_tags, 64); + SLSClearWindowTags(g_connection, border->id, clear_tags, 64); SLSSetWindowOpacity(g_connection, border->id, 0); SLSSetMouseEventEnableFlags(g_connection, border->id, false); SLSSetWindowLevel(g_connection, border->id, window_level(window));