<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>489488</bug_id>
          
          <creation_ts>2024-06-30 11:24:15 +0000</creation_ts>
          <short_desc>Maximized window restored to the wrong monitor</short_desc>
          <delta_ts>2024-09-24 21:33:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>kwin</product>
          <component>multi-screen</component>
          <version>6.1.0</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>multiscreen</keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Edoardo Lolletti">edoardo762</reporter>
          <assigned_to name="KWin default assignee">kwin-bugs-null</assigned_to>
          <cc>nate</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/kwin/-/commit/b48581379322d33cf57c4e4510049a49f85e10cc</cf_commitlink>
          <cf_versionfixedin>6.2.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2333546</commentid>
    <comment_count>0</comment_count>
    <who name="Edoardo Lolletti">edoardo762</who>
    <bug_when>2024-06-30 11:24:15 +0000</bug_when>
    <thetext>STEPS TO REPRODUCE
1. have a non maximized window on a monitor
2. Drag the window on another monitor, and snap it to the top of the screen so that it is maximized
3. Restore the window either with double clicking the title bar, pressing the window button, or keyboard combination

OBSERVED RESULT
The window is restored in the exact size and location it was dragged from the first time, thus in the wrong monitor
EXPECTED RESULT
The window is restored in the monitor it is currently in with the original dimensions

ADDITIONAL INFORMATION
This worked as expected in plasma 5.27 and 6.0, happens on both x11 and wayland</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2355343</commentid>
    <comment_count>1</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2024-09-17 14:39:08 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6404</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2357748</commentid>
    <comment_count>2</comment_count>
    <who name="Zamundaaa">xaver.hugl</who>
    <bug_when>2024-09-20 17:08:04 +0000</bug_when>
    <thetext>Git commit dadf3f3a9774e930a50d002bb9f0daf2a806ac40 by Xaver Hugl.
Committed on 20/09/2024 at 16:58.
Pushed by zamundaaa into branch &apos;master&apos;.

window: move geometry restore to new output on electric border maximize

Otherwise, unmaximizing the window will move it to a different screen than it&apos;s
currently on, which is confusing

M  +3    -2    autotests/integration/quick_tiling_test.cpp
M  +3    -0    src/window.cpp

https://invent.kde.org/plasma/kwin/-/commit/dadf3f3a9774e930a50d002bb9f0daf2a806ac40</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2357757</commentid>
    <comment_count>3</comment_count>
    <who name="Zamundaaa">xaver.hugl</who>
    <bug_when>2024-09-20 17:31:07 +0000</bug_when>
    <thetext>Git commit b48581379322d33cf57c4e4510049a49f85e10cc by Xaver Hugl.
Committed on 20/09/2024 at 17:13.
Pushed by zamundaaa into branch &apos;Plasma/6.2&apos;.

window: move geometry restore to new output on electric border maximize

Otherwise, unmaximizing the window will move it to a different screen than it&apos;s
currently on, which is confusing


(cherry picked from commit dadf3f3a9774e930a50d002bb9f0daf2a806ac40)

Co-authored-by: Xaver Hugl &lt;xaver.hugl@gmail.com&gt;

M  +3    -2    autotests/integration/quick_tiling_test.cpp
M  +3    -0    src/window.cpp

https://invent.kde.org/plasma/kwin/-/commit/b48581379322d33cf57c4e4510049a49f85e10cc</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>