Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
skiko
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuqiang
skiko
Commits
ef40b461
Unverified
Commit
ef40b461
authored
Jan 07, 2026
by
Alexander Maryanovsky
Committed by
GitHub
Jan 07, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move transparentWindowBackgroundHack from Compose to Skiko (#1145)
parent
37e1d91b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
7 deletions
+26
-7
PlatformOperations.kt
.../awtMain/kotlin/org/jetbrains/skiko/PlatformOperations.kt
+25
-4
SkiaLayerTest.kt
...o/src/awtTest/kotlin/org/jetbrains/skiko/SkiaLayerTest.kt
+1
-3
No files found.
skiko/src/awtMain/kotlin/org/jetbrains/skiko/PlatformOperations.kt
View file @
ef40b461
...
@@ -129,7 +129,28 @@ internal val platformOperations: PlatformOperations by lazy {
...
@@ -129,7 +129,28 @@ internal val platformOperations: PlatformOperations by lazy {
}
}
// OSX
// OSX
external
private
fun
osxIsFullscreenNative
(
component
:
Component
):
Boolean
private
external
fun
osxIsFullscreenNative
(
component
:
Component
):
Boolean
external
private
fun
osxSetFullscreenNative
(
component
:
Component
,
value
:
Boolean
)
private
external
fun
osxSetFullscreenNative
(
component
:
Component
,
value
:
Boolean
)
external
private
fun
osxDisableTitleBar
(
component
:
Component
,
headerHeight
:
Float
)
private
external
fun
osxDisableTitleBar
(
component
:
Component
,
headerHeight
:
Float
)
external
private
fun
osxOrderEmojiAndSymbolsPopup
()
private
external
fun
osxOrderEmojiAndSymbolsPopup
()
// Transparent window hack
private
val
TRANSPARENT_COLOR
=
java
.
awt
.
Color
(
0
,
0
,
0
,
0
)
/**
* Returns the color that should be set as the [Window.background] for transparent windows.
*
* Note that this is a workaround for an implementation detail of OpenGL and Software
* (and possibly other) renderers on Windows. As such, it may be removed in the future.
*/
@DelicateSkikoApi
fun
transparentWindowBackgroundHack
(
renderApi
:
GraphicsApi
):
java
.
awt
.
Color
?
{
// There is a hack inside OpenGL and Software redrawers for Windows that makes the
// window transparent without setting the `background` of the AWT window. It is done
// by getting the native component parent and calling `DwmEnableBlurBehindWindow`.
//
// FIXME: Make OpenGL work inside transparent window (background == Color(0, 0, 0, 0)) without this hack.
// See `enableTransparentWindow` (skiko/src/awtMain/cpp/windows/window_util.cc)
val
skikoTransparentWindowHack
=
hostOs
==
OS
.
Windows
&&
renderApi
!=
GraphicsApi
.
DIRECT3D
return
if
(
skikoTransparentWindowHack
)
null
else
TRANSPARENT_COLOR
}
skiko/src/awtTest/kotlin/org/jetbrains/skiko/SkiaLayerTest.kt
View file @
ef40b461
...
@@ -1368,9 +1368,7 @@ class SkiaLayerTest {
...
@@ -1368,9 +1368,7 @@ class SkiaLayerTest {
layer
.
transparency
=
true
layer
.
transparency
=
true
layer
.
background
=
Color
(
0
,
0
,
0
,
0
)
layer
.
background
=
Color
(
0
,
0
,
0
,
0
)
isUndecorated
=
true
isUndecorated
=
true
background
=
transparentWindowBackgroundHack
(
renderApi
)
val
transparentWindowHack
=
(
hostOs
==
OS
.
Windows
)
&&
(
renderApi
!=
GraphicsApi
.
DIRECT3D
)
background
=
if
(
transparentWindowHack
)
null
else
Color
(
0
,
0
,
0
,
0
)
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment