fix: coklu monitorde cascade dogru ekrani kullanir, .deb guncellendi
- window_persistence: onceki pencerenin bulundugu monitorun calisma alani kullanilir (getAllDisplays), primary degil - viewer_screen: catchError donus tipi duzeltildi (analyze warning) - dist/imajviewer_1.0.0_amd64.deb yeniden derlendi
This commit is contained in:
1 parent
a65bdc152c
commit
56ab4b5495
3 files changed
+18
-2
No files matched your search
Vendored
BIN
Binary file not shown.
@@ -60,7 +60,7 @@ class _ViewerScreenState extends State<ViewerScreen> with WindowListener {
|
|||||||
case 'resize':
|
case 'resize':
|
||||||
case 'move':
|
case 'move':
|
||||||
// Son bilinen konumu hemen güncelle (kapanış senkron kaydı için)
|
// Son bilinen konumu hemen güncelle (kapanış senkron kaydı için)
|
||||||
windowManager.getBounds().then((b) => _lastBounds = b).catchError((_) {});
|
windowManager.getBounds().then((b) => _lastBounds = b).catchError((_) => _lastBounds);
|
||||||
_saveDebounce?.cancel();
|
_saveDebounce?.cancel();
|
||||||
_saveDebounce = Timer(const Duration(milliseconds: 300), () {
|
_saveDebounce = Timer(const Duration(milliseconds: 300), () {
|
||||||
_doSave();
|
_doSave();
|
||||||
|
|||||||
@@ -61,7 +61,23 @@ class WindowPersistence {
|
|||||||
required Size previousSize,
|
required Size previousSize,
|
||||||
}) async {
|
}) async {
|
||||||
try {
|
try {
|
||||||
final display = await screenRetriever.getPrimaryDisplay();
|
final displays = await screenRetriever.getAllDisplays();
|
||||||
|
|
||||||
|
// Önceki pencerenin bulunduğu monitörü bul (çoklu monitör desteği)
|
||||||
|
Display display = await screenRetriever.getPrimaryDisplay();
|
||||||
|
for (final d in displays) {
|
||||||
|
final pos = d.visiblePosition;
|
||||||
|
final size = d.visibleSize ?? d.size;
|
||||||
|
if (pos != null &&
|
||||||
|
previousPosition.dx >= pos.dx &&
|
||||||
|
previousPosition.dx < pos.dx + size.width &&
|
||||||
|
previousPosition.dy >= pos.dy &&
|
||||||
|
previousPosition.dy < pos.dy + size.height) {
|
||||||
|
display = d;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final workLeft = display.visiblePosition?.dx ?? 0;
|
final workLeft = display.visiblePosition?.dx ?? 0;
|
||||||
final workTop = display.visiblePosition?.dy ?? 0;
|
final workTop = display.visiblePosition?.dy ?? 0;
|
||||||
final workWidth = display.visibleSize?.width ?? display.size.width;
|
final workWidth = display.visibleSize?.width ?? display.size.width;
|
||||||
|
|||||||
Reference in new issue
Block a user