<?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>387736</bug_id>
          
          <creation_ts>2017-12-09 11:41:48 +0000</creation_ts>
          <short_desc>Last window size restored (correctly) only for most left display</short_desc>
          <delta_ts>2021-09-16 17:48:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Frameworks and Libraries</classification>
          <product>frameworks-kconfig</product>
          <component>general</component>
          <version>5.47.0</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>427875</dup_id>
          
          <bug_file_loc>https://bugreports.qt.io/browse/QTBUG-50788</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>hugor.hugolin</reporter>
          <assigned_to name="Matthew Dawson">matthew</assigned_to>
          <cc>kdelibs-bugs-null</cc>
    
    <cc>nate</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1715735</commentid>
    <comment_count>0</comment_count>
    <who name="">hugor.hugolin</who>
    <bug_when>2017-12-09 11:41:48 +0000</bug_when>
    <thetext>Inside KWindowConfig::restoreWindowSize
const QRect desk = window-&gt;screen()-&gt;geometry();
always returns resolution of the most left screen (regardless whether it is primary and regardless of where the window actually appears).

This seems to be the same bug as reported here: https://bugreports.qt.io/browse/QTBUG-50788

This have a nasty effect that when you open kf5 application it always has [a size it had last time when it was closed on most left screen].


Even if it is found out that this is a qt-bug workaround is probably possible, because the virtually same code inside KWindowConfig::saveWindowSize returns correct screen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1766896</commentid>
    <comment_count>1</comment_count>
    <who name="">hugor.hugolin</who>
    <bug_when>2018-07-14 10:37:12 +0000</bug_when>
    <thetext>The bug is also reproducible on Wayland.
Restoring last window size basically works only on the most left screen!

I wonder how can anybody use kf5 applications on any setup where your most used screen is not on the left.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1767007</commentid>
    <comment_count>2</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2018-07-15 03:38:54 +0000</bug_when>
    <thetext>Since you&apos;ve identified the code responsible, any chance you&apos;d be interested in producing a patch? Here&apos;s the documentation:

- https://community.kde.org/Get_Involved/development
- https://community.kde.org/Infrastructure/Phabricator</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2061449</commentid>
    <comment_count>3</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2021-09-16 17:48:55 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 427875 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>