- Add 0001-Store-correctly-the-window-position-with-Wayland.patch
to fix possible menu shifting on GNOME Wayland (see upstream bug https://www.lyx.org/trac/ticket/11746) Some highlights: * Added the ability to create new child documents from within the 'include file' dialog * Pasting table content outside a table no longer pastes tab characters OBS-URL: https://build.opensuse.org/package/show/Publishing/lyx?expand=0&rev=201
This commit is contained in:
parent
188c0dade8
commit
f6e5956811
98
0001-Store-correctly-the-window-position-with-Wayland.patch
Normal file
98
0001-Store-correctly-the-window-position-with-Wayland.patch
Normal file
@ -0,0 +1,98 @@
|
||||
Index: src/frontends/qt/GuiApplication.cpp
|
||||
===================================================================
|
||||
--- src/frontends/qt/GuiApplication.cpp (revision 5061db891c2b7b9ca96ca40a3ee90bd9b2c76392)
|
||||
+++ src/frontends/qt/GuiApplication.cpp (revision 222a317dd243fb18f01bfa6e994902fee06ae3db)
|
||||
@@ -1090,4 +1090,27 @@
|
||||
|
||||
|
||||
+#if QT_VERSION < 0x050000
|
||||
+// Emulate platformName() for Qt4
|
||||
+
|
||||
+// FIXME: when ditching this method, remove all tests
|
||||
+// platformName() == "qt4x11"
|
||||
+// in the code
|
||||
+QString GuiApplication::platformName() const
|
||||
+{
|
||||
+# if defined(Q_WS_X11)
|
||||
+ // Note that this one does not really exist
|
||||
+ return "qt4x11";
|
||||
+# elif defined(Q_OS_MAC)
|
||||
+ return "cocoa";
|
||||
+# elif defined(Q_OS_WIN) || defined(Q_CYGWIN_WIN)
|
||||
+ return "windows";
|
||||
+# else
|
||||
+ LYXERR0("Unknown platform!");
|
||||
+ return "unknown";
|
||||
+# endif
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
double GuiApplication::pixelRatio() const
|
||||
{
|
||||
Index: src/frontends/qt/GuiApplication.h
|
||||
===================================================================
|
||||
--- src/frontends/qt/GuiApplication.h (revision 5061db891c2b7b9ca96ca40a3ee90bd9b2c76392)
|
||||
+++ src/frontends/qt/GuiApplication.h (revision 222a317dd243fb18f01bfa6e994902fee06ae3db)
|
||||
@@ -161,4 +161,9 @@
|
||||
GuiView & view(int id) const;
|
||||
|
||||
+#if (QT_VERSION < 0x050000)
|
||||
+ /// Emulate platformName() for Qt4
|
||||
+ QString platformName() const;
|
||||
+#endif
|
||||
+
|
||||
/// Current ratio between physical pixels and device-independent pixels
|
||||
double pixelRatio() const;
|
||||
Index: src/frontends/qt/GuiView.cpp
|
||||
===================================================================
|
||||
--- src/frontends/qt/GuiView.cpp (revision 21422dd6527754d8b7876a6e11b686cd726321ed)
|
||||
+++ src/frontends/qt/GuiView.cpp (revision 222a317dd243fb18f01bfa6e994902fee06ae3db)
|
||||
@@ -817,10 +817,9 @@
|
||||
settings.beginGroup("views");
|
||||
settings.beginGroup(QString::number(id_));
|
||||
-#if defined(Q_WS_X11) || defined(QPA_XCB)
|
||||
- settings.setValue("pos", pos());
|
||||
- settings.setValue("size", size());
|
||||
-#else
|
||||
- settings.setValue("geometry", saveGeometry());
|
||||
-#endif
|
||||
+ if (guiApp->platformName() == "qt4x11" || guiApp->platformName() == "xcb") {
|
||||
+ settings.setValue("pos", pos());
|
||||
+ settings.setValue("size", size());
|
||||
+ } else
|
||||
+ settings.setValue("geometry", saveGeometry());
|
||||
settings.setValue("layout", saveState(0));
|
||||
settings.setValue("icon_size", toqstr(d.iconSize(iconSize())));
|
||||
@@ -862,17 +861,18 @@
|
||||
setIconSize(d.iconSize(settings.value(icon_key).toString()));
|
||||
|
||||
-#if defined(Q_WS_X11) || defined(QPA_XCB)
|
||||
- QPoint pos = settings.value("pos", QPoint(50, 50)).toPoint();
|
||||
- QSize size = settings.value("size", QSize(690, 510)).toSize();
|
||||
- resize(size);
|
||||
- move(pos);
|
||||
-#else
|
||||
- // Work-around for bug #6034: the window ends up in an undetermined
|
||||
- // state when trying to restore a maximized window when it is
|
||||
- // already maximized.
|
||||
- if (!(windowState() & Qt::WindowMaximized))
|
||||
- if (!restoreGeometry(settings.value("geometry").toByteArray()))
|
||||
- setGeometry(50, 50, 690, 510);
|
||||
-#endif
|
||||
+ if (guiApp->platformName() == "qt4x11" || guiApp->platformName() == "xcb") {
|
||||
+ QPoint pos = settings.value("pos", QPoint(50, 50)).toPoint();
|
||||
+ QSize size = settings.value("size", QSize(690, 510)).toSize();
|
||||
+ resize(size);
|
||||
+ move(pos);
|
||||
+ } else {
|
||||
+ // Work-around for bug #6034: the window ends up in an undetermined
|
||||
+ // state when trying to restore a maximized window when it is
|
||||
+ // already maximized.
|
||||
+ if (!(windowState() & Qt::WindowMaximized))
|
||||
+ if (!restoreGeometry(settings.value("geometry").toByteArray()))
|
||||
+ setGeometry(50, 50, 690, 510);
|
||||
+ }
|
||||
+
|
||||
// Make sure layout is correctly oriented.
|
||||
setLayoutDirection(qApp->layoutDirection());
|
12
lyx.changes
12
lyx.changes
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 1 08:26:16 UTC 2020 - Cor Blom <cornelis@solcon.nl>
|
||||
|
||||
- Add 0001-Store-correctly-the-window-position-with-Wayland.patch
|
||||
to fix possible menu shifting on GNOME Wayland (see upstream bug
|
||||
https://www.lyx.org/trac/ticket/11746)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 28 09:58:37 UTC 2020 - Cor Blom <cornelis@solcon.nl>
|
||||
|
||||
@ -5,7 +12,12 @@ Sat Nov 28 09:58:37 UTC 2020 - Cor Blom <cornelis@solcon.nl>
|
||||
* Small improvements and bug fixes all over the place. For
|
||||
details see included ANNOUNCE
|
||||
or https://www.lyx.org/announce/2_3_6.txt
|
||||
Some highlights:
|
||||
* On openSUSE: the correct mathfonts are now displayed
|
||||
* Added the ability to create new child documents from within the
|
||||
'include file' dialog
|
||||
* Pasting table content outside a table no longer pastes tab
|
||||
characters
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 21 20:41:51 UTC 2020 - Cor Blom <cornelis@solcon.nl>
|
||||
|
3
lyx.spec
3
lyx.spec
@ -36,6 +36,8 @@ Patch0: correct-shebang.patch
|
||||
# PATCH-FIX-UPSTREAM remove_python_shebang.patch mcepl@suse.com
|
||||
# remove all instances of python2 shebang lines
|
||||
Patch1: remove_python_shebang.patch
|
||||
# PATCH-FIX-UPSTREAM see https://www.lyx.org/trac/ticket/11746
|
||||
Patch2: 0001-Store-correctly-the-window-position-with-Wayland.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: bc
|
||||
@ -141,6 +143,7 @@ A collection of Math symbol fonts for LyX.
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p0
|
||||
|
||||
%build
|
||||
#./autogen.sh
|
||||
|
Loading…
Reference in New Issue
Block a user