mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
Keep the manual second screen option when Dual screen is Off (#1777)
This commit is contained in:
1 parent
a3da6f0bda
commit
7d3d338fb9
3 files changed
+3
-5
No files matched your search
@@ -1739,8 +1739,7 @@ class FrontEndActivity : ComponentActivity() {
|
||||
// The launcher can itself be shown on a non-default display (DeX, an external monitor); that one is not a "second screen".
|
||||
val ownDisplayId = if (android.os.Build.VERSION.SDK_INT >= 30) display?.displayId ?: android.view.Display.DEFAULT_DISPLAY else @Suppress("DEPRECATION") windowManager.defaultDisplay.displayId
|
||||
dualScreenMode = SessionPrefs.dualScreenMode(this)
|
||||
secondScreenDisplays = if (dualScreenMode == com.droiddeck.launcher.input.DualScreen.MODE_OFF) emptyList()
|
||||
else SecondScreenDisplays.available(displayManager, ownDisplayId)
|
||||
secondScreenDisplays = SecondScreenDisplays.available(displayManager, ownDisplayId)
|
||||
dualScreenDevice = com.droiddeck.launcher.input.DualScreen.anyDisplay(displayManager, ownDisplayId) != null
|
||||
dualScreenLauncher = SessionPrefs.dualScreenLauncher(this)
|
||||
dualScreenControls = SessionPrefs.dualScreenSessionControls(this)
|
||||
|
||||
@@ -2909,9 +2909,8 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
private fun refreshSecondScreenDisplays() {
|
||||
if (!::displayManager.isInitialized) return
|
||||
val primaryId = shownOnDisplayId
|
||||
val dualOff = SessionPrefs.dualScreenMode(this) == com.droiddeck.launcher.input.DualScreen.MODE_OFF
|
||||
val candidates = SecondScreenDisplays.available(displayManager, primaryId)
|
||||
.filter { !dualOff && (glassesScreen == null || it.id != glasses.displayId) }
|
||||
.filter { glassesScreen == null || it.id != glasses.displayId }
|
||||
val oldIds = secondScreenDisplays.map { it.id }.toSet()
|
||||
secondScreenDisplays = candidates
|
||||
val newIds = candidates.map { it.id }.toSet()
|
||||
|
||||
Reference in new issue
Block a user