Hello community,
here is the log from the commit of package konsole for openSUSE:12.1:Update:Test checked in at 2011-12-09 18:07:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.1:Update:Test/konsole (Old)
and /work/SRC/openSUSE:12.1:Update:Test/.konsole.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "konsole", Maintainer is "kde-maintainers@suse.de"
Changes:
--------
--- /work/SRC/openSUSE:12.1:Update:Test/konsole/konsole.changes 2011-12-09 18:07:08.000000000 +0100
+++ /work/SRC/openSUSE:12.1:Update:Test/.konsole.new/konsole.changes 2011-12-09 18:07:08.000000000 +0100
@@ -1,0 +2,5 @@
+Fri Nov 4 18:54:42 UTC 2011 - ctrippe@opensuse.org
+
+- Fix resize of the konsole window (bnc#692446)
+
+-------------------------------------------------------------------
New:
----
bnc692446_fix_resize.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ konsole.spec ++++++
--- /var/tmp/diff_new_pack.rZvSj2/_old 2011-12-09 18:07:09.000000000 +0100
+++ /var/tmp/diff_new_pack.rZvSj2/_new 2011-12-09 18:07:09.000000000 +0100
@@ -32,6 +32,7 @@
Source24: utilities-terminal-su-48.png
Source25: utilities-terminal-su-64.png
Source26: utilities-terminal-su-128.png
+Patch: bnc692446_fix_resize.diff
BuildRequires: fdupes
BuildRequires: libkde4-devel
BuildRequires: pkgconfig(libxklavier)
@@ -43,6 +44,7 @@
%prep
%setup -q -n konsole-%{version}
+%patch -p 1
%build
%cmake_kde4 -d build
++++++ bnc692446_fix_resize.diff ++++++
Subject: Fix the size reported by konsole
From: Jekyll Wu
Signed-Off-By: Christian Trippe
Bug: bnc#692446
Patch-upstream: kde >= 4.8
I changed the line
connect( _shellProcess,SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(done(int,QProcess::ExitStatus)) );
into
connect( _shellProcess,SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(done(int)) );
in the diff for session.cpp to fit with 4.7
commit 7e00edd5166096feb59ffa694b6a6ff858fe1924
Author: Kurt Hindenburg
Date: Fri Aug 5 10:40:14 2011 -0400
Make sure pty device has right size before terminal process queries it.
Whenever TeminalDisplay is resized, konsole tells the underlying
pty device its new size by calling Pty::setWindowSize(). However,
current code can't guarantee when the terminal process starts and
queries the pty device about its size, the pty device already has the
right info. This has caused some long known bugs, such as #176902.
This patch tries to guarantee that important assumption. It currently
uses a hard-coded small delay, which works pretty well in practice
although not that elegant.
Patch by Jekyll Wu
I think this is better than leaving the situation as it is. This may
be backported if no issues are found.
BUG: 173999
BUG: 176902
BUG: 203185
BUG: 229058
REVIEW: 102061
FIXED-IN: 4.8
diff --git a/src/Application.cpp b/src/Application.cpp
index 9351772..244ec5e 100644
--- a/src/Application.cpp
+++ b/src/Application.cpp
@@ -442,7 +442,6 @@ Session* Application::createSession(Profile::Ptr profile, const QString& directo
// a change in terminal size right after the session starts. some applications such as GNU Screen
// and Midnight Commander don't like this happening
view->createView(session);
- session->run();
return session;
}
diff --git a/src/Emulation.cpp b/src/Emulation.cpp
index e769833..f86b53d 100644
--- a/src/Emulation.cpp
+++ b/src/Emulation.cpp
@@ -58,7 +58,8 @@ Emulation::Emulation() :
_codec(0),
_decoder(0),
_keyTranslator(0),
- _usesMouse(false)
+ _usesMouse(false),
+ _imageSizeInitialized(false)
{
// create screens with a default size
_screen[0] = new Screen(40,80);
@@ -347,14 +348,37 @@ void Emulation::setImageSize(int lines, int columns)
QSize newSize(columns,lines);
if (newSize == screenSize[0] && newSize == screenSize[1])
- return;
+ {
+ // If this method is called for the first time, always emit
+ // SIGNAL(imageSizeChange()), even if the new size is the same as the
+ // current size. See #176902
+ if (!_imageSizeInitialized)
+ {
+ emit imageSizeChanged(lines,columns);
+ }
+ }
+ else
+ {
+ _screen[0]->resizeImage(lines,columns);
+ _screen[1]->resizeImage(lines,columns);
- _screen[0]->resizeImage(lines,columns);
- _screen[1]->resizeImage(lines,columns);
+ emit imageSizeChanged(lines,columns);
- emit imageSizeChanged(lines,columns);
+ bufferedUpdate();
+ }
+
+ if (!_imageSizeInitialized)
+ {
+ _imageSizeInitialized = true;
+
+ // FIXME
+ // a hard-coded, small delay is introduced to gurarantee Session::run()
+ // does not get triggered by SIGNAL(imageSizeInitialized()) before
+ // Pty::setWindowSize() is triggered by previously emitted
+ // SIGNAL(imageSizeChanged()); See #203185
+ QTimer::singleShot(200, this, SIGNAL(imageSizeInitialized()) );
+ }
- bufferedUpdate();
}
QSize Emulation::imageSize() const
diff --git a/src/Emulation.h b/src/Emulation.h
index 2a6c371..cb5fbcf 100644
--- a/src/Emulation.h
+++ b/src/Emulation.h
@@ -378,6 +378,12 @@ signals:
*/
void imageSizeChanged(int lineCount , int columnCount);
+ /**
+ * Emitted when the setImageSize() is called on this emulation for
+ * the first time.
+ */
+ void imageSizeInitialized();
+
/**
* Emitted when the terminal program requests to change various properties
* of the terminal display.
@@ -462,6 +468,7 @@ private:
bool _usesMouse;
QTimer _bulkTimer1;
QTimer _bulkTimer2;
+ bool _imageSizeInitialized;
};
diff --git a/src/Session.cpp b/src/Session.cpp
index 5890d5c..8b735e7 100644
--- a/src/Session.cpp
+++ b/src/Session.cpp
@@ -177,6 +177,7 @@ void Session::openTeletype(int fd)
connect( _emulation,SIGNAL(useUtf8Request(bool)),_shellProcess,SLOT(setUtf8Mode(bool)) );
connect( _shellProcess,SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(done(int)) );
connect( _emulation,SIGNAL(imageSizeChanged(int,int)),this,SLOT(updateWindowSize(int,int)) );
+ connect( _emulation,SIGNAL(imageSizeInitialized()),this,SLOT(run()) );
}
WId Session::windowId() const
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org