1. 29 Sep, 2020 1 commit
    • David Edmundson's avatar
      [kmainwindow] Don't create native windows for non-toplevel windows · 03b0f4c3
      David Edmundson authored
      winId() creates a QPlaformWindow; i.e a native xcb_window or wl_surface.
      This makes sense for a toplevel which will be a real window.
      
      If someone (in this case localize) uses kmainwindow as a subwidget
      inside an existing window the current code will create a subwindow for
      this widget. It's a very weird window, as the window is never actually
      mapped so all contents are drawn as part of the parent window. Leaving
      us in a very corrupt state.
      
      Doing this on XCB is wasteful but the side effects are unnoticed. On
      QtWayland things explode in weird ways.
      
      BUG: 424024
      03b0f4c3
  2. 25 Sep, 2020 1 commit
  3. 17 Sep, 2020 1 commit
  4. 15 Sep, 2020 1 commit
  5. 10 Sep, 2020 1 commit
  6. 28 Aug, 2020 1 commit
    • Nate Graham's avatar
      Allow opting out of remembering window positions on X11 · 39f7171d
      Nate Graham authored
      Various people have requested this, for reasons that seem sensible
      enough to me:
      - Some people like the KWin positioning modes and want all windows to
        follow them
      - It might be annoying to have only KDE apps follow this setting and
        preferable to not use it at all for pepole who use mostly non-KDE apps
      - The per-screen-arrangement memory feature may interact strangely or in
        a buggy manner for some people's screen arrangements
      
      For those reasons, it seems reasonable to allow disabling the feature,
      though it still remains on by default. This commit turns it off if
      `AllowKDEAppsToRememberWindowPositions=false` is set in the user's
      `kdeglobals` file. A GUI to toggle this will be added in a separate
      commit to some System Settings KCM.
      
      CCBUG: 415150
      39f7171d
  7. 20 Aug, 2020 1 commit
    • Nate Graham's avatar
      Save and restore position of main window · bbcfcc53
      Nate Graham authored
      This commit invokes the new KWindowConfig::saveWindowPosition() and
      KWindowConfig::restoreWindowPosition() added to KConfig in
      frameworks/kconfig!14. As a
      result, KDE apps using KXMLGui now automatically save and restore the
      positions of their windows on a per-screen-arrangement basis.
      
      BUG: 415150
      FIXED-IN: 5.74
      bbcfcc53
  8. 10 Aug, 2020 2 commits
  9. 04 Jun, 2020 1 commit
    • Igor Poboiko's avatar
      [KMainWindow] Invoke QIcon::setFallbackThemeName (later) · 899c0f7f
      Igor Poboiko authored
      Summary:
      This is alternative approach to {D22488} and commit 4214045 to KIconThemes.
      Okular (and most - if not all - KDE apps) inherit KMainWindow, so KDE apps
      should have breeze icons). KMainWindow ctor should be early enough so no icons
      are yet loaded, but late enough so QGuiApplication is already inited.
      
      This should be followed by reverting commit 4214045 in KIconThemes.
      
      Original problem description (by @mart):
      invoking QIcon::setFallbackThemeName at QCoreApplication ctor
      with Q_COREAPP_STARTUP_FUNCTION breaks the internal status of
      QIconLoader as it instantiates it before the QPlatformTheme,
      but QIconLoader depends from QPlatformTheme to be already instantiated
      otherwise it won't load correctly, thus breaking icon loading
      in QtQuickControls2 styles, such as Material and Fusion
      see https://bugreports.qt.io/browse/QTBUG-74252
      
      CCBUG: 402172
      
      Test Plan:
      Don't have GTK3 QPA plugin, so cannot test it yet.
      I would appreciate if someone helped me with testing :)
      
      Reviewers: aacid, mart, broulik
      
      Subscribers: mart, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D29826
      899c0f7f
  10. 11 Jan, 2020 1 commit
    • Friedrich W. H. Kossebau's avatar
      KMainWindow: fix autoSaveSettings to catch QDockWidgets being shown again · 6f08f7ae
      Friedrich W. H. Kossebau authored
      Summary:
      If QDockWidgets are "shown" in QWidget sense a second time, no resize or
      move events might happen as the widget has already been layouted before
      and might simply reappear at same position with same size.
      The old logic did not catch this, so would keep an outdated state stored
      in the auto-save settings of the window, which then would result in wrong
      state being enforced on restoring.
      
      Test Plan:
      Open KDevelop, open a toolview which was not open before (e.g. "Search in
      all Files"), switch to another toolview not open before, then switch back
      to the first toolview. Now either switch the currently viewed document
      (e.g. open another file) or quit & reopen KDevelop.
      Before the first toolview would hide itself despite officially being still
      visible, with this patch the state is properly hold (when internally being
      restored, like during finalizeGUI on KXmlGui client change).
      
      Reviewers: #frameworks, #kdevelop, dfaure
      
      Reviewed By: dfaure
      
      Subscribers: SGOrava, kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D26501
      6f08f7ae
  11. 08 Jan, 2020 1 commit
    • David Edmundson's avatar
      Drop unused headers · 0c410c8e
      David Edmundson authored
      Summary:
      KWindowSystem as a framework is still used or KKeyServer, so it can't be
      completely removed.
      
      Test Plan: Compiles
      
      Reviewers: apol
      
      Reviewed By: apol
      
      Subscribers: kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D26512
      0c410c8e
  12. 01 Dec, 2019 1 commit
  13. 20 Nov, 2019 1 commit
    • Nate Graham's avatar
      Also allow invoking session restoration logic when apps are manually launched · 46e5b32e
      Nate Graham authored
      Summary:
      Right now session restoration logic only ever gets invoked when apps are started
      automatically after rebooting, because of the check for `qApp->isSessionRestored()`.
      This limits the feature to only working for that use case, since `qApp->isSessionRestored()`
      is set by Qt and we can't override it in the app itself to signal that we want the session
      restoration behavior for other reasons. As a result, we can't use it to implement the
      behavior of restoring the condition of app when it's manually launched, which has been
      requested for several of our apps.
      
      This patch removes the check for `qApp->isSessionRestored()`, which opens the door to
      implementing the requested features in our apps.
      
      CCBUG: 397463
      CCBUG: 413564
      
      Test Plan:
      D11382 now works
      
      Normal session restoration behavior after a reboot is unchanged
      
      Apps with session restoration behavior but without a user-facing option to invoke it
      don't restore session at inappropriate times.
      
      Reviewers: davidedmundson, #frameworks
      
      Reviewed By: davidedmundson
      
      Subscribers: kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D25106
      46e5b32e
  14. 20 Oct, 2019 1 commit
  15. 17 Oct, 2019 1 commit
    • Friedrich W. H. Kossebau's avatar
      Use ECMGenerateExportHeader to manage deprecated API better · 808bd05b
      Friedrich W. H. Kossebau authored
      Summary:
      Allows
      * projects linking to KXmlGui to hide deprecated API up to a
        given version or silence deprecation warnings after a given version,
        using
        * -DKXMLGUI_DISABLE_DEPRECATED_BEFORE_AND_AT
        * -DKXMLGUI_NO_DEPRECATED
        * -DKXMLGUI_DEPRECATED_WARNINGS_SINCE
        * -DKXMLGUI_NO_DEPRECATED_WARNINGS
      
        or
        * -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT
        * -DKF_NO_DEPRECATED
        * -DKF_DEPRECATED_WARNINGS_SINCE
        * -DKF_NO_DEPRECATED_WARNINGS
      * to build KXmlGui optionally with deprecated API excluded from
        the build, using "EXCLUDE_DEPRECATED_BEFORE_AND_AT" cmake argument.
      
      Test Plan:
      Builds with EXCLUDE_DEPRECATED_BEFORE_AND_AT set to 0, 4.1.0, 5.0.0,
      CURRENT.
      
      Reviewers: #frameworks, dfaure, mlaurent
      
      Reviewed By: dfaure, mlaurent
      
      Subscribers: kde-frameworks-devel
      
      Tags: #frameworks
      
      Differential Revision: https://phabricator.kde.org/D24466
      808bd05b
  16. 10 Sep, 2019 1 commit
  17. 09 Sep, 2019 1 commit
  18. 24 Aug, 2019 1 commit
  19. 19 Jul, 2019 1 commit
    • Kai Uwe Broulik's avatar
      Remove visibilityChanged connection in favor of existing eventFilter · d4af86d8
      Kai Uwe Broulik authored
      KMainWindow compresses saving its configuration by a 500ms timer. However, for QDockWidget visibilityChanged
      a direct connection to the setSettingsDirty method is made, which immediately saves settings.
      Since there is already an eventFilter also listening for QEvent::Show and QEvent::Hide, the connection to
      visibilityChanged is redundant since that signal is emitted from the respective event handler anyway.
      The main benefit is that the eventFilter code compresses the configuration save,
      not jeopardizing startup time for applications with lots of dock widgets like Dolphin.
      
      Differential Revision: https://phabricator.kde.org/D22523
      d4af86d8
  20. 18 Jul, 2019 1 commit
  21. 25 Jan, 2019 1 commit
  22. 04 Nov, 2018 1 commit
  23. 23 Oct, 2018 1 commit
  24. 22 Oct, 2018 1 commit
  25. 17 Jul, 2018 1 commit
    • Mladen Milinkovic's avatar
      Fix KMainWindow saving incorrect widget settings · d35a8828
      Mladen Milinkovic authored
      BUG: 395988
      In certain cases KMainWindow::saveMainWindowSettings() could have been
      called after mainwindow started destroying itself. Window settings would
      be saved with incorrect child widget states. e.g. some widgets would be
      saved as hidden even if they were visible before destroying.
      d35a8828
  26. 04 May, 2018 1 commit
  27. 13 Apr, 2018 1 commit
  28. 11 Mar, 2018 1 commit
  29. 16 Aug, 2017 1 commit
  30. 16 Jan, 2017 2 commits
  31. 20 Dec, 2016 1 commit
  32. 20 Oct, 2016 1 commit
  33. 13 Mar, 2016 2 commits
  34. 19 Feb, 2016 1 commit
    • Andreas Hartmetz's avatar
      Fix session management broken since KF5 / Qt5. · f7cbcc77
      Andreas Hartmetz authored
      Requires Qt 5.6 branch not more than a few days old, or >= 5.6.0
      when it is released.
      Parts of the fix are:
      - Call QGuiApplication::setFallbackSessionManagementEnabled(false)
        to prevent application suicide through a mechanism that tries to
        help applications without any proper session management support,
        but badly interferes with applications that do implement proper
        session management, such as KDE applications.
      - Add back commitData[Request] handling. For some reason it was
        removed during porting.
      - Change the returned types of saveState() and commitData() to void.
        The return values were unused.
      
      BUG: 354724
      f7cbcc77
  35. 26 Nov, 2015 1 commit
  36. 18 Nov, 2015 1 commit
  37. 22 Oct, 2015 1 commit
    • Michael Pyne's avatar
      kmainwindow: Pre-fill translator information when available. · e4d10c79
      Michael Pyne authored
      KCoreAddons's KAboutData can store information about the translators for
      the application when using non-en_US messages. This information is
      encoded by translating a specific message string, which can no longer be
      done within KAboutData (compared to KDE 4) since KCoreAddons can't use
      KI18n.
      
      Applications have been able to manually add translator information, but
      there's no reason we can't do this by default for the majority of
      our KF5-based applications.
      
      Combined with updates to the KAboutData API documentation I believe this
      should also fix bug 345320.
      
      BUG:345320
      FIXED-IN:5.16
      REVIEW:125682
      e4d10c79