mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
disable screenshots/screen recording on wayland
GitOrigin-RevId: 80715b3d3601177099a953fe22f943c49442012a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
aac80c5a19
commit
557ea312a0
@@ -6,6 +6,7 @@ import com.intellij.openapi.diagnostic.logger
|
||||
import com.intellij.openapi.project.ProjectManager
|
||||
import com.intellij.openapi.ui.playback.PlaybackContext
|
||||
import com.intellij.openapi.ui.playback.commands.PlaybackCommandCoroutineAdapter
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
import com.intellij.util.system.OS
|
||||
import com.intellij.util.ui.ImageUtil
|
||||
import kotlinx.coroutines.*
|
||||
@@ -111,6 +112,8 @@ internal fun takeScreenshotOfAllWindowsBlocking(childFolder: String? = null) {
|
||||
internal fun takeFullScreenshot(childFolder: String? = null): String {
|
||||
// don't try to take a screenshot when IDE in a headless mode
|
||||
if (ApplicationManager.getApplication().isHeadlessEnvironment) return ""
|
||||
// On Wayland it triggers system dialog about granting permissions each time, and it can't be disabled.
|
||||
if (SystemInfo.isWayland) return ""
|
||||
|
||||
var screenshotPath = File(PathManager.getLogPath() + "/screenshots/" + (childFolder ?: "default"))
|
||||
screenshotPath = getNextFolder(screenshotPath)
|
||||
|
||||
Reference in New Issue
Block a user