From 3df02b2205c960d4c18293a64fccb8b603480c39 Mon Sep 17 00:00:00 2001 From: Michael Jennings Date: Wed, 14 May 2008 19:49:22 +0000 Subject: [PATCH] Wed May 14 12:42:51 2008 Michael Jennings (mej) Patch from Kim Woelders : There is a race problem with Eterm during startup related to the shell LINES/COLUMNS env vars. If the WM changes the window size (e.g. due to saved settings) before mapping the window, sometimes the shell will set LINES and COLUMNS according to the old/incorrect size and sometimes to the new/correct size, depending on wheter the call to tt_winsize() at command.c line 2322 (by the shell child process) or the tt_resize() (by the Eterm process) due to the ConfigureNotify caused by the resize (or WM ICCCM ConfigureNotify) operation happens first. The call in question was added by Azundris for Escreen. So far Escreen seems to be behaving properly with this patch applied, but all my Eterm windows (Escreen and otherwise) are pre-sized with -g anyway. So I'm going to keep my eye on it for awhile. In case of trouble, change the "#if 0" to "#ifdef ESCREEN" to revert to previous behavior when in Escreen mode. Normal operation should not require the call in question. ---------------------------------------------------------------------- SVN revision: 34568 --- ChangeLog | 24 ++++++++++++++++++++++++ Eterm.spec | 24 ++++++++++++------------ configure.in | 2 +- src/command.c | 6 +++++- 4 files changed, 42 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index d3a389b..798e997 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5531,3 +5531,27 @@ Tue Jul 3 20:48:46 2007 Michael Jennings (mej) Remove some cruft from kEsetroot. ---------------------------------------------------------------------- +Wed May 14 12:42:51 2008 Michael Jennings (mej) + +Patch from Kim Woelders : + + There is a race problem with Eterm during startup related to the + shell LINES/COLUMNS env vars. + + If the WM changes the window size (e.g. due to saved settings) + before mapping the window, sometimes the shell will set LINES and + COLUMNS according to the old/incorrect size and sometimes to the + new/correct size, depending on wheter the call to tt_winsize() at + command.c line 2322 (by the shell child process) or the + tt_resize() (by the Eterm process) due to the ConfigureNotify + caused by the resize (or WM ICCCM ConfigureNotify) operation + happens first. + +The call in question was added by Azundris for Escreen. So far +Escreen seems to be behaving properly with this patch applied, but all +my Eterm windows (Escreen and otherwise) are pre-sized with -g anyway. +So I'm going to keep my eye on it for awhile. In case of trouble, +change the "#if 0" to "#ifdef ESCREEN" to revert to previous behavior +when in Escreen mode. Normal operation should not require the call in +question. +---------------------------------------------------------------------- diff --git a/Eterm.spec b/Eterm.spec index 01875bb..4b071d0 100644 --- a/Eterm.spec +++ b/Eterm.spec @@ -9,18 +9,18 @@ Summary: Enlightened terminal emulator Name: Eterm -Version: 0.9.4 -Release: 1 -#Release: 0.%(date '+%Y%m%d') +Version: 0.9.5 +#Release: 1 +Release: 0.%(date '+%Y%m%d') License: BSD Group: User Interface/X Requires: imlib2, imlib2-loader_jpeg, imlib2-loader_png -#BuildSuggests: xorg-x11-devel -BuildRequires: libast imlib2-devel XFree86-devel -Source0: ftp://ftp.eterm.org/pub/Eterm/%{name}-%{version}.tar.%{compression} -Source1: ftp://ftp.eterm.org/pub/Eterm/%{name}-bg-%{version}.tar.%{compression} +#BuildSuggests: xorg-x11-devel XFree86-devel xorg-x11-proto-devel libXext-devel libXt-devel freetype-devel +BuildRequires: libast imlib2-devel +Source0: http://www.eterm.org/download/%{name}-%{version}.tar.%{compression} +Source1: http://www.eterm.org/download/%{name}-bg-%{version}.tar.%{compression} URL: http://www.eterm.org/ -BuildRoot: /var/tmp/%{name}-%{version}-root +BuildRoot: %{?_tmppath}%{!?_tmppath:/var/tmp}/%{name}-%{version}-root %description Eterm is a color vt102 terminal emulator with enhanced graphical @@ -47,21 +47,21 @@ export CFLAGS %{__make} %{?mflags} %install -rm -rf $RPM_BUILD_ROOT +%{__rm} -rf $RPM_BUILD_ROOT # If the configure macro is used above (which it is), there # is NO reason to use the makeinstall macro here, so don't. %{__make} install DESTDIR=$RPM_BUILD_ROOT %{?mflags_install} ( cd $RPM_BUILD_ROOT - mv .%{_bindir}/%{name} .%{_bindir}/%{name}-%{version} + %{__mv} .%{_bindir}/%{name} .%{_bindir}/%{name}-%{version} cd $RPM_BUILD_ROOT%{_bindir} - ln -f -s %{name}-%{version} %{name} + %{__ln_s} -f %{name}-%{version} %{name} cd $RPM_BUILD_ROOT chmod +x .%{_libdir}/lib*so* ||: ) -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/applnk/Utilities +%{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/X11/applnk/Utilities cat > $RPM_BUILD_ROOT%{_sysconfdir}/X11/applnk/Utilities/Eterm.desktop <