Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package xdg-desktop-portal-hyprland for 
openSUSE:Factory checked in at 2025-09-15 19:53:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xdg-desktop-portal-hyprland (Old)
 and      /work/SRC/openSUSE:Factory/.xdg-desktop-portal-hyprland.new.1977 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xdg-desktop-portal-hyprland"

Mon Sep 15 19:53:18 2025 rev:17 rq:1304799 version:1.3.10

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/xdg-desktop-portal-hyprland/xdg-desktop-portal-hyprland.changes
  2025-06-23 15:02:57.800005305 +0200
+++ 
/work/SRC/openSUSE:Factory/.xdg-desktop-portal-hyprland.new.1977/xdg-desktop-portal-hyprland.changes
        2025-09-15 19:57:23.750412572 +0200
@@ -1,0 +2,21 @@
+Wed Sep 10 20:18:22 UTC 2025 - Marcus Rueckert <[email protected]>
+
+- Update to version 1.3.10:
+  - Fixes
+    - core: don't scan drm nodes on each new notification
+  - MRs
+    - Fix inverted arguments in
+      CGlobalShortcutsPortal::onListShortcuts by @checkraisefold in
+      #310
+    - nix: mesa -> libgbm by @andresilva in #318
+    - Implement hyprland-toplevel-mapping-v1 protocol by @WhySoBad
+      in #322
+    - shared: include vector header by @LinuxUserGD in #335
+    - nix: add meta.mainProgram to xdg-desktop-portal-hyprland by
+      @luisnquin in #337
+    - nix: use gcc15 by @FridayFaerie in #338
+    - fix (nix): removed duplicated directory copying by
+      @conneroisu in #339
+    - Properly set title and class by @dasJ in #341
+
+-------------------------------------------------------------------

Old:
----
  xdg-desktop-portal-hyprland-1.3.9.tar.gz

New:
----
  xdg-desktop-portal-hyprland-1.3.10.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xdg-desktop-portal-hyprland.spec ++++++
--- /var/tmp/diff_new_pack.n5jqy2/_old  2025-09-15 19:57:24.230432727 +0200
+++ /var/tmp/diff_new_pack.n5jqy2/_new  2025-09-15 19:57:24.234432894 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package xdg-desktop-portal-hyprland
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2025 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global __builder ninja
 
 Name:           xdg-desktop-portal-hyprland
-Version:        1.3.9
+Version:        1.3.10
 Release:        0
 Summary:        Extended xdg-desktop-portal backend for Hyprland
 License:        MIT

++++++ xdg-desktop-portal-hyprland-1.3.9.tar.gz -> 
xdg-desktop-portal-hyprland-1.3.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xdg-desktop-portal-hyprland-1.3.9/.github/workflows/nix-build.yaml 
new/xdg-desktop-portal-hyprland-1.3.10/.github/workflows/nix-build.yaml
--- old/xdg-desktop-portal-hyprland-1.3.9/.github/workflows/nix-build.yaml      
2024-12-19 01:48:58.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.10/.github/workflows/nix-build.yaml     
2025-07-27 18:31:18.000000000 +0200
@@ -1,16 +1,33 @@
 name: Build xdph (Nix)
-
-on: [push, pull_request, workflow_dispatch]
+'on':
+  - push
+  - pull_request
+  - workflow_dispatch
 jobs:
   nix:
-    name: "Build"
+    name: Build
     runs-on: ubuntu-latest
     steps:
-    - name: Clone repository
-      uses: actions/checkout@v3
-
-    - uses: cachix/install-nix-action@v27
-    - uses: DeterminateSystems/magic-nix-cache-action@main
-
-    - name: Build xdg-desktop-portal-hyprland
-      run: nix build --print-build-logs --extra-substituters 
"https://hyprland.cachix.org";
+      - name: Clone repository
+        uses: actions/checkout@v3
+      - name: Install Nix
+        uses: nixbuild/nix-quick-install-action@v31
+        with:
+          nix_conf: |
+            keep-env-derivations = true
+            keep-outputs = true
+      - name: Restore and save Nix store
+        uses: nix-community/cache-nix-action@v6
+        with:
+          primary-key: 'nix-${{ runner.os }}-${{ hashFiles(''**/*.nix'', 
''**/flake.lock'') }}'
+          restore-prefixes-first-match: 'nix-${{ runner.os }}-'
+          gc-max-store-size-linux: 1G
+          purge: true
+          purge-prefixes: 'nix-${{ runner.os }}-'
+          purge-created: 0
+          purge-last-accessed: 0
+          purge-primary-key: never
+      - name: Build xdg-desktop-portal-hyprland
+        run: >-
+          nix build --print-build-logs --extra-substituters
+          "https://hyprland.cachix.org";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.9/CMakeLists.txt 
new/xdg-desktop-portal-hyprland-1.3.10/CMakeLists.txt
--- old/xdg-desktop-portal-hyprland-1.3.9/CMakeLists.txt        2024-12-19 
01:48:58.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.10/CMakeLists.txt       2025-07-27 
18:31:18.000000000 +0200
@@ -130,7 +130,10 @@
             true)
 protocolnew("${HYPRLAND_PROTOCOLS}/protocols" "hyprland-toplevel-export-v1"
             true)
+protocolnew("${HYPRLAND_PROTOCOLS}/protocols" "hyprland-toplevel-mapping-v1"
+        true)
 protocolnew("stable/linux-dmabuf" "linux-dmabuf-v1" false)
+protocolnew("staging/ext-foreign-toplevel-list" "ext-foreign-toplevel-list-v1" 
false)
 
 # Installation
 install(TARGETS hyprland-share-picker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.9/VERSION 
new/xdg-desktop-portal-hyprland-1.3.10/VERSION
--- old/xdg-desktop-portal-hyprland-1.3.9/VERSION       2024-12-19 
01:48:58.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.10/VERSION      2025-07-27 
18:31:18.000000000 +0200
@@ -1 +1 @@
-1.3.9
+1.3.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.9/flake.lock 
new/xdg-desktop-portal-hyprland-1.3.10/flake.lock
--- old/xdg-desktop-portal-hyprland-1.3.9/flake.lock    2024-12-19 
01:48:58.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.10/flake.lock   2025-07-27 
18:31:18.000000000 +0200
@@ -10,11 +10,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1728345020,
-        "narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=",
+        "lastModified": 1749046714,
+        "narHash": "sha256-kymV5FMnddYGI+UjwIw8ceDjdeg7ToDVjbHCvUlhn14=",
         "owner": "hyprwm",
         "repo": "hyprland-protocols",
-        "rev": "a7c183800e74f337753de186522b9017a07a8cee",
+        "rev": "613878cb6f459c5e323aaafe1e6f388ac8a36330",
         "type": "github"
       },
       "original": {
@@ -36,11 +36,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1734364628,
-        "narHash": "sha256-ii8fzJfI953n/EmIxVvq64ZAwhvwuuPHWfGd61/mJG8=",
+        "lastModified": 1749145882,
+        "narHash": "sha256-qr0KXeczF8Sma3Ae7+dR2NHhvG7YeLBJv19W4oMu6ZE=",
         "owner": "hyprwm",
         "repo": "hyprlang",
-        "rev": "16e59c1eb13d9fb6de066f54e7555eb5e8a4aba5",
+        "rev": "1bfb84f54d50c7ae6558c794d3cfd5f6a7e6e676",
         "type": "github"
       },
       "original": {
@@ -59,11 +59,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1733502241,
-        "narHash": "sha256-KAUNC4Dgq8WQjYov5auBw/usaHixhacvb7cRDd0AG/k=",
+        "lastModified": 1749135356,
+        "narHash": "sha256-Q8mAKMDsFbCEuq7zoSlcTuxgbIBVhfIYpX0RjE32PS0=",
         "owner": "hyprwm",
         "repo": "hyprutils",
-        "rev": "104117aed6dd68561be38b50f218190aa47f2cd8",
+        "rev": "e36db00dfb3a3d3fdcc4069cb292ff60d2699ccb",
         "type": "github"
       },
       "original": {
@@ -82,11 +82,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1726874836,
-        "narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
+        "lastModified": 1749145760,
+        "narHash": "sha256-IHaGWpGrv7seFWdw/1A+wHtTsPlOGIKMrk1TUIYJEFI=",
         "owner": "hyprwm",
         "repo": "hyprwayland-scanner",
-        "rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
+        "rev": "817918315ea016cc2d94004bfb3223b5fd9dfcc6",
         "type": "github"
       },
       "original": {
@@ -97,11 +97,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1734119587,
-        "narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=",
+        "lastModified": 1748929857,
+        "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5",
+        "rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
         "type": "github"
       },
       "original": {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xdg-desktop-portal-hyprland-1.3.9/hyprland-share-picker/main.cpp 
new/xdg-desktop-portal-hyprland-1.3.10/hyprland-share-picker/main.cpp
--- old/xdg-desktop-portal-hyprland-1.3.9/hyprland-share-picker/main.cpp        
2024-12-19 01:48:58.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.10/hyprland-share-picker/main.cpp       
2025-07-27 18:31:18.000000000 +0200
@@ -61,13 +61,17 @@
         const auto TITLESEPPOS = rolling.find("[HE>]");
         const auto TITLESTR    = rolling.substr(CLASSSEPPOS + 5, TITLESEPPOS - 
5 - CLASSSEPPOS);
 
+        // window address
+        const auto WINDOWSEPPOS = rolling.find("[HA>]");
+        const auto WINDOWADDR = rolling.substr(TITLESEPPOS + 5, WINDOWSEPPOS - 
5 - TITLESEPPOS);
+
         try {
             result.push_back({TITLESTR, CLASSSTR, std::stoull(IDSTR)});
         } catch (std::exception& e) {
             // silent err
         }
 
-        rolling = rolling.substr(TITLESEPPOS + 5);
+        rolling = rolling.substr(WINDOWSEPPOS + 5);
     }
 
     return result;
@@ -93,6 +97,8 @@
     QSettings* settings = new 
QSettings("/tmp/hypr/hyprland-share-picker.conf", QSettings::IniFormat);
     w.setGeometry(0, 0, settings->value("width").toInt(), 
settings->value("height").toInt());
 
+    
QCoreApplication::setApplicationName("org.hyprland.xdg-desktop-portal-hyprland");
+
     // get the tabwidget
     const auto TABWIDGET        = w.findChild<QTabWidget*>("tabWidget");
     const auto ALLOWTOKENBUTTON = w.findChild<QCheckBox*>("checkBox");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xdg-desktop-portal-hyprland-1.3.9/hyprland-share-picker/mainpicker.ui 
new/xdg-desktop-portal-hyprland-1.3.10/hyprland-share-picker/mainpicker.ui
--- old/xdg-desktop-portal-hyprland-1.3.9/hyprland-share-picker/mainpicker.ui   
2024-12-19 01:48:58.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.10/hyprland-share-picker/mainpicker.ui  
2025-07-27 18:31:18.000000000 +0200
@@ -29,7 +29,7 @@
    </size>
   </property>
   <property name="windowTitle">
-   <string>MainPicker</string>
+   <string>Select what to share</string>
   </property>
   <widget class="QWidget" name="centralwidget">
    <property name="sizePolicy">
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.9/nix/default.nix 
new/xdg-desktop-portal-hyprland-1.3.10/nix/default.nix
--- old/xdg-desktop-portal-hyprland-1.3.9/nix/default.nix       2024-12-19 
01:48:58.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.10/nix/default.nix      2025-07-27 
18:31:18.000000000 +0200
@@ -11,7 +11,7 @@
   hyprutils,
   hyprwayland-scanner,
   libdrm,
-  mesa,
+  libgbm,
   pipewire,
   qtbase,
   qttools,
@@ -24,12 +24,13 @@
   wayland-scanner,
   debug ? false,
   version ? "git",
+  src,
 }:
 stdenv.mkDerivation {
   pname = "xdg-desktop-portal-hyprland" + lib.optionalString debug "-debug";
   inherit version;
 
-  src = ../.;
+  inherit src;
 
   depsBuildBuild = [
     pkg-config
@@ -48,7 +49,7 @@
     hyprlang
     hyprutils
     libdrm
-    mesa
+    libgbm
     pipewire
     qtbase
     qttools
@@ -79,6 +80,7 @@
   '';
 
   meta = with lib; {
+    mainProgram = "xdg-desktop-portal-hyprland";
     homepage = "https://github.com/hyprwm/xdg-desktop-portal-hyprland";;
     description = "xdg-desktop-portal backend for Hyprland";
     license = licenses.bsd3;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xdg-desktop-portal-hyprland-1.3.9/nix/overlays.nix 
new/xdg-desktop-portal-hyprland-1.3.10/nix/overlays.nix
--- old/xdg-desktop-portal-hyprland-1.3.9/nix/overlays.nix      2024-12-19 
01:48:58.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.10/nix/overlays.nix     2025-07-27 
18:31:18.000000000 +0200
@@ -17,7 +17,6 @@
   default = lib.composeManyExtensions [
     self.overlays.xdg-desktop-portal-hyprland
     self.overlays.sdbus-cpp_2
-    self.overlays.hypr-gcc14Stdenv
     inputs.hyprland-protocols.overlays.default
     inputs.hyprwayland-scanner.overlays.default
     inputs.hyprlang.overlays.default
@@ -27,9 +26,10 @@
   xdg-desktop-portal-hyprland = lib.composeManyExtensions [
     (final: prev: {
       xdg-desktop-portal-hyprland = final.callPackage ./default.nix {
-        stdenv = prev.gcc14Stdenv;
+        stdenv = prev.gcc15Stdenv;
         inherit (final.qt6) qtbase qttools wrapQtAppsHook qtwayland;
         inherit version;
+        src = self;
       };
     })
   ];
@@ -60,18 +60,4 @@
         };
       }));
   };
-
-  # TODO: remove this when the next version of Hyprland is available (in 
Nixpkgs)
-  hypr-gcc14Stdenv = final: prev: {
-    hyprcursor = (prev.hyprcursor.override {stdenv = 
prev.gcc14Stdenv;}).overrideAttrs (self: super: {
-      src = final.fetchFromGitHub {
-        owner = "hyprwm";
-        repo = "hyprcursor";
-        rev = "f388aacd22be4a6e4d634fbaf6f75eb0713d239a";
-        hash = "sha256-+2bZJL2u5hva7rSp65OfKJBK+k03T6GB/NCvpoS1OOo=";
-      };
-    });
-    hyprlang = prev.hyprlang.override {stdenv = prev.gcc14Stdenv;};
-    hyprutil = prev.hyprutil.override {stdenv = prev.gcc14Stdenv;};
-  };
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xdg-desktop-portal-hyprland-1.3.9/protocols/meson.build 
new/xdg-desktop-portal-hyprland-1.3.10/protocols/meson.build
--- old/xdg-desktop-portal-hyprland-1.3.9/protocols/meson.build 2024-12-19 
01:48:58.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.10/protocols/meson.build        
2025-07-27 18:31:18.000000000 +0200
@@ -4,7 +4,7 @@
 )
 
 hyprland_protos = dependency('hyprland-protocols',
-       version: '>=0.2',
+       version: '>=0.6.4',
        fallback: 'hyprland-protocols',
 )
 
@@ -21,8 +21,10 @@
        'wlr-screencopy-unstable-v1.xml',
        'wlr-foreign-toplevel-management-unstable-v1.xml',
        hl_protocol_dir / 'protocols/hyprland-toplevel-export-v1.xml',
+       hl_protocol_dir / 'protocols/hyprland-toplevel-mapping-v1.xml',
        hl_protocol_dir / 'protocols/hyprland-global-shortcuts-v1.xml',
        wl_protocol_dir / 'stable/linux-dmabuf/linux-dmabuf-v1.xml',
+       wl_protocol_dir / 
'staging/ext-foreign-toplevel-list/ext-foreign-toplevel-list-v1.xml',
 ]
 
 wl_proto_files = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xdg-desktop-portal-hyprland-1.3.9/src/core/PortalManager.cpp 
new/xdg-desktop-portal-hyprland-1.3.10/src/core/PortalManager.cpp
--- old/xdg-desktop-portal-hyprland-1.3.9/src/core/PortalManager.cpp    
2024-12-19 01:48:58.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.10/src/core/PortalManager.cpp   
2025-07-27 18:31:18.000000000 +0200
@@ -90,6 +90,9 @@
         
m_sWaylandConnection.linuxDmabufFeedback->setMainDevice([this](CCZwpLinuxDmabufFeedbackV1*
 r, wl_array* device_arr) {
             Debug::log(LOG, "[core] dmabufFeedbackMainDevice");
 
+            if (m_sWaylandConnection.dma.done)
+                return;
+
             RASSERT(!m_sWaylandConnection.gbm, "double dmabuf feedback");
 
             dev_t device;
@@ -107,6 +110,9 @@
         
m_sWaylandConnection.linuxDmabufFeedback->setFormatTable([this](CCZwpLinuxDmabufFeedbackV1*
 r, int fd, uint32_t size) {
             Debug::log(TRACE, "[core] dmabufFeedbackFormatTable");
 
+            if (m_sWaylandConnection.dma.done)
+                return;
+
             m_vDMABUFMods.clear();
 
             m_sWaylandConnection.dma.formatTable = mmap(NULL, size, PROT_READ, 
MAP_PRIVATE, fd, 0);
@@ -123,15 +129,22 @@
         
m_sWaylandConnection.linuxDmabufFeedback->setDone([this](CCZwpLinuxDmabufFeedbackV1*
 r) {
             Debug::log(TRACE, "[core] dmabufFeedbackDone");
 
+            if (m_sWaylandConnection.dma.done)
+                return;
+
             if (m_sWaylandConnection.dma.formatTable)
                 munmap(m_sWaylandConnection.dma.formatTable, 
m_sWaylandConnection.dma.formatTableSize);
 
             m_sWaylandConnection.dma.formatTable     = nullptr;
             m_sWaylandConnection.dma.formatTableSize = 0;
+            m_sWaylandConnection.dma.done            = true;
         });
         
m_sWaylandConnection.linuxDmabufFeedback->setTrancheTargetDevice([this](CCZwpLinuxDmabufFeedbackV1*
 r, wl_array* device_arr) {
             Debug::log(TRACE, "[core] dmabufFeedbackTrancheTargetDevice");
 
+            if (m_sWaylandConnection.dma.done)
+                return;
+
             dev_t device;
             assert(device_arr->size == sizeof(device));
             memcpy(&device, device_arr->data, sizeof(device));
@@ -152,6 +165,9 @@
         
m_sWaylandConnection.linuxDmabufFeedback->setTrancheFormats([this](CCZwpLinuxDmabufFeedbackV1*
 r, wl_array* indices) {
             Debug::log(TRACE, "[core] dmabufFeedbackTrancheFormats");
 
+            if (m_sWaylandConnection.dma.done)
+                return;
+
             if (!m_sWaylandConnection.dma.deviceUsed || 
!m_sWaylandConnection.dma.formatTable)
                 return;
 
@@ -177,6 +193,9 @@
         
m_sWaylandConnection.linuxDmabufFeedback->setTrancheDone([this](CCZwpLinuxDmabufFeedbackV1*
 r) {
             Debug::log(TRACE, "[core] dmabufFeedbackTrancheDone");
 
+            if (m_sWaylandConnection.dma.done)
+                return;
+
             m_sWaylandConnection.dma.deviceUsed = false;
         });
 
@@ -192,6 +211,11 @@
         if 
(!std::any_cast<Hyprlang::INT>(m_sConfig.config->getConfigValue("general:toplevel_dynamic_bind")))
             m_sHelpers.toplevel->activate();
     }
+
+    else if (INTERFACE == hyprland_toplevel_mapping_manager_v1_interface.name) 
{
+        m_sHelpers.toplevelMapping = 
std::make_unique<CToplevelMappingManager>(makeShared<CCHyprlandToplevelMappingManagerV1>(
+            
(wl_proxy*)wl_registry_bind((wl_registry*)m_sWaylandConnection.registry->resource(),
 name, &hyprland_toplevel_mapping_manager_v1_interface, version)));
+    }
 }
 
 void CPortalManager::onGlobalRemoved(uint32_t name) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xdg-desktop-portal-hyprland-1.3.9/src/core/PortalManager.hpp 
new/xdg-desktop-portal-hyprland-1.3.10/src/core/PortalManager.hpp
--- old/xdg-desktop-portal-hyprland-1.3.9/src/core/PortalManager.hpp    
2024-12-19 01:48:58.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.10/src/core/PortalManager.hpp   
2025-07-27 18:31:18.000000000 +0200
@@ -10,6 +10,7 @@
 #include "../portals/GlobalShortcuts.hpp"
 #include "../helpers/Timer.hpp"
 #include "../shared/ToplevelManager.hpp"
+#include "../shared/ToplevelMappingManager.hpp"
 #include <gbm.h>
 #include <xf86drm.h>
 
@@ -63,7 +64,8 @@
     } m_sPortals;
 
     struct {
-        std::unique_ptr<CToplevelManager> toplevel;
+        std::unique_ptr<CToplevelManager>        toplevel;
+        std::unique_ptr<CToplevelMappingManager> toplevelMapping;
     } m_sHelpers;
 
     struct {
@@ -79,6 +81,7 @@
             void*  formatTable     = nullptr;
             size_t formatTableSize = 0;
             bool   deviceUsed      = false;
+            bool   done            = false;
         } dma;
     } m_sWaylandConnection;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xdg-desktop-portal-hyprland-1.3.9/src/portals/GlobalShortcuts.cpp 
new/xdg-desktop-portal-hyprland-1.3.10/src/portals/GlobalShortcuts.cpp
--- old/xdg-desktop-portal-hyprland-1.3.9/src/portals/GlobalShortcuts.cpp       
2024-12-19 01:48:58.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.10/src/portals/GlobalShortcuts.cpp      
2025-07-27 18:31:18.000000000 +0200
@@ -130,7 +130,7 @@
     return {0, data};
 }
 
-dbUasv CGlobalShortcutsPortal::onListShortcuts(sdbus::ObjectPath 
sessionHandle, sdbus::ObjectPath requestHandle) {
+dbUasv CGlobalShortcutsPortal::onListShortcuts(sdbus::ObjectPath 
requestHandle, sdbus::ObjectPath sessionHandle) {
     Debug::log(LOG, "[globalshortcuts] List keys:");
     Debug::log(LOG, "[globalshortcuts]  | {}", sessionHandle.c_str());
 
@@ -192,4 +192,4 @@
     Debug::log(TRACE, "[gs] Session {} called deactivated on {}", 
PSESSION->sessionHandle.c_str(), pKeybind->id);
 
     
m_pObject->emitSignal("Deactivated").onInterface(INTERFACE_NAME).withArguments(PSESSION->sessionHandle,
 pKeybind->id, time, std::unordered_map<std::string, sdbus::Variant>{});
-}
\ No newline at end of file
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xdg-desktop-portal-hyprland-1.3.9/src/shared/ScreencopyShared.cpp 
new/xdg-desktop-portal-hyprland-1.3.10/src/shared/ScreencopyShared.cpp
--- old/xdg-desktop-portal-hyprland-1.3.9/src/shared/ScreencopyShared.cpp       
2024-12-19 01:48:58.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.10/src/shared/ScreencopyShared.cpp      
2025-07-27 18:31:18.000000000 +0200
@@ -31,8 +31,9 @@
         return result;
 
     for (auto& e : g_pPortalManager->m_sHelpers.toplevel->m_vToplevels) {
-        result += std::format("{}[HC>]{}[HT>]{}[HE>]", 
(uint32_t)(((uint64_t)e->handle->resource()) & 0xFFFFFFFF), 
sanitizeNameForWindowList(e->windowClass),
-                              sanitizeNameForWindowList(e->windowTitle));
+        result += std::format("{}[HC>]{}[HT>]{}[HE>]{}[HA>]", 
(uint32_t)(((uint64_t)e->handle->resource()) & 0xFFFFFFFF), 
sanitizeNameForWindowList(e->windowClass),
+                              sanitizeNameForWindowList(e->windowTitle),
+                              g_pPortalManager->m_sHelpers.toplevelMapping ? 
g_pPortalManager->m_sHelpers.toplevelMapping->getWindowForToplevel(e->handle) : 
0);
     }
 
     return result;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xdg-desktop-portal-hyprland-1.3.9/src/shared/ToplevelManager.cpp 
new/xdg-desktop-portal-hyprland-1.3.10/src/shared/ToplevelManager.cpp
--- old/xdg-desktop-portal-hyprland-1.3.9/src/shared/ToplevelManager.cpp        
2024-12-19 01:48:58.000000000 +0100
+++ new/xdg-desktop-portal-hyprland-1.3.10/src/shared/ToplevelManager.cpp       
2025-07-27 18:31:18.000000000 +0200
@@ -19,6 +19,8 @@
         Debug::log(TRACE, "[toplevel] toplevel at {} closed", (void*)this);
 
         std::erase_if(g_pPortalManager->m_sHelpers.toplevel->m_vToplevels, 
[&](const auto& e) { return e.get() == this; });
+        if (g_pPortalManager->m_sHelpers.toplevelMapping)
+            
g_pPortalManager->m_sHelpers.toplevelMapping->m_muAddresses.erase(this->handle);
     });
 }
 
@@ -41,9 +43,15 @@
     m_pManager->setToplevel([this](CCZwlrForeignToplevelManagerV1* r, 
wl_proxy* newHandle) {
         Debug::log(TRACE, "[toplevel] New toplevel at {}", (void*)newHandle);
 
-        
m_vToplevels.emplace_back(makeShared<SToplevelHandle>(makeShared<CCZwlrForeignToplevelHandleV1>(newHandle)));
+        const auto HANDLE = 
m_vToplevels.emplace_back(makeShared<SToplevelHandle>(makeShared<CCZwlrForeignToplevelHandleV1>(newHandle)));
+        if (g_pPortalManager->m_sHelpers.toplevelMapping)
+            
g_pPortalManager->m_sHelpers.toplevelMapping->fetchWindowForToplevel(HANDLE->handle);
+    });
+    m_pManager->setFinished([this](CCZwlrForeignToplevelManagerV1* r) {
+        m_vToplevels.clear();
+        if (g_pPortalManager->m_sHelpers.toplevelMapping)
+            
g_pPortalManager->m_sHelpers.toplevelMapping->m_muAddresses.clear();
     });
-    m_pManager->setFinished([this](CCZwlrForeignToplevelManagerV1* r) { 
m_vToplevels.clear(); });
 
     wl_display_roundtrip(g_pPortalManager->m_sWaylandConnection.display);
 
@@ -60,6 +68,8 @@
 
     m_pManager.reset();
     m_vToplevels.clear();
+    if (g_pPortalManager->m_sHelpers.toplevelMapping)
+        g_pPortalManager->m_sHelpers.toplevelMapping->m_muAddresses.clear();
 
     Debug::log(LOG, "[toplevel] unbound manager");
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xdg-desktop-portal-hyprland-1.3.9/src/shared/ToplevelMappingManager.cpp 
new/xdg-desktop-portal-hyprland-1.3.10/src/shared/ToplevelMappingManager.cpp
--- old/xdg-desktop-portal-hyprland-1.3.9/src/shared/ToplevelMappingManager.cpp 
1970-01-01 01:00:00.000000000 +0100
+++ 
new/xdg-desktop-portal-hyprland-1.3.10/src/shared/ToplevelMappingManager.cpp    
    2025-07-27 18:31:18.000000000 +0200
@@ -0,0 +1,40 @@
+#include "ToplevelMappingManager.hpp"
+#include "../helpers/Log.hpp"
+#include <vector>
+
+CToplevelMappingManager::CToplevelMappingManager(SP<CCHyprlandToplevelMappingManagerV1>
 mgr) : m_pManager(mgr) {
+    Debug::log(LOG, "[toplevel mapping] registered manager");
+}
+
+void 
CToplevelMappingManager::fetchWindowForToplevel(SP<CCZwlrForeignToplevelHandleV1>
 handle) {
+    if (!handle)
+        return;
+
+    Debug::log(TRACE, "[toplevel mapping] fetching window for toplevel at {}", 
(void*)handle.get());
+    auto const HANDLE = 
makeShared<CCHyprlandToplevelWindowMappingHandleV1>(m_pManager->sendGetWindowForToplevelWlr(handle->resource()));
+
+    m_vHandles.push_back(HANDLE);
+
+    HANDLE->setWindowAddress([this, 
handle](CCHyprlandToplevelWindowMappingHandleV1* h, uint32_t address_hi, 
uint32_t address) {
+        const auto ADDRESS = (uint64_t)address_hi << 32 | address;
+        m_muAddresses.insert_or_assign(handle, ADDRESS);
+        Debug::log(TRACE, "[toplevel mapping] mapped toplevel at {} to window 
{}", (void*)handle.get(), ADDRESS);
+        std::erase_if(m_vHandles, [&](const auto& other) { return other.get() 
== h; });
+    });
+
+    HANDLE->setFailed([this, handle](CCHyprlandToplevelWindowMappingHandleV1* 
h) {
+        Debug::log(TRACE, "[toplevel mapping] failed to map toplevel at {} to 
window", (void*)handle.get());
+        std::erase_if(m_vHandles, [&](const auto& other) { return other.get() 
== h; });
+    });
+}
+
+uint64_t 
CToplevelMappingManager::getWindowForToplevel(CSharedPointer<CCZwlrForeignToplevelHandleV1>
 handle) {
+    auto iter = m_muAddresses.find(handle);
+    if (iter != m_muAddresses.end())
+        return iter->second;
+
+    if (handle)
+        Debug::log(TRACE, "[toplevel mapping] did not find window address for 
toplevel at {}", (void*)handle.get());
+
+    return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xdg-desktop-portal-hyprland-1.3.9/src/shared/ToplevelMappingManager.hpp 
new/xdg-desktop-portal-hyprland-1.3.10/src/shared/ToplevelMappingManager.hpp
--- old/xdg-desktop-portal-hyprland-1.3.9/src/shared/ToplevelMappingManager.hpp 
1970-01-01 01:00:00.000000000 +0100
+++ 
new/xdg-desktop-portal-hyprland-1.3.10/src/shared/ToplevelMappingManager.hpp    
    2025-07-27 18:31:18.000000000 +0200
@@ -0,0 +1,24 @@
+#pragma once
+
+#include "wayland.hpp"
+#include "hyprland-toplevel-mapping-v1.hpp"
+#include "wlr-foreign-toplevel-management-unstable-v1.hpp"
+#include <memory>
+#include "../includes.hpp"
+
+class CToplevelMappingManager {
+  public:
+    CToplevelMappingManager(SP<CCHyprlandToplevelMappingManagerV1> mgr);
+
+    uint64_t getWindowForToplevel(SP<CCZwlrForeignToplevelHandleV1> handle);
+
+  private:
+    SP<CCHyprlandToplevelMappingManagerV1>                          m_pManager 
= nullptr;
+
+    std::unordered_map<SP<CCZwlrForeignToplevelHandleV1>, uint64_t> 
m_muAddresses;
+    std::vector<SP<CCHyprlandToplevelWindowMappingHandleV1>>        m_vHandles;
+    void                                                            
fetchWindowForToplevel(SP<CCZwlrForeignToplevelHandleV1> handle);
+
+    friend struct SToplevelHandle;
+    friend class CToplevelManager;
+};
\ No newline at end of file

Reply via email to