Fixes the detection of the terminal size after a SIGWINCH signal
This commit is contained in:
parent
4c3b5b6737
commit
38df8e2db2
|
@ -1,3 +1,6 @@
|
|||
2021-04-21 Markus Gans <guru.mail@muenster.de>
|
||||
* Fixes the detection of the terminal size after a SIGWINCH signal
|
||||
|
||||
2021-04-18 Markus Gans <guru.mail@muenster.de>
|
||||
* Decoupling the FWidget and FWindow classes from FVTerm
|
||||
* Avoid redrawing widgets when show() is called multiple times
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Makefile.am - FINAL CUT library
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
AM_CPPFLAGS = -Iinclude -Wall -Werror -DCOMPILE_FINAL_CUT -std=c++11
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/src/include -Wall -Werror -DCOMPILE_FINAL_CUT -std=c++11
|
||||
|
||||
SUBDIRS = .
|
||||
|
||||
|
@ -79,7 +79,7 @@ libfinal_la_SOURCES = \
|
|||
fwidget_functions.cpp \
|
||||
fobject.cpp
|
||||
|
||||
libfinal_la_LDFLAGS = -version-info @SO_VERSION@
|
||||
libfinal_la_LDFLAGS = -no-undefined -version-info @SO_VERSION@
|
||||
|
||||
finalcutincludedir = $(includedir)/final
|
||||
|
||||
|
|
|
@ -1247,9 +1247,10 @@ FWidget* FApplication::processParameters (const Args& args)
|
|||
//----------------------------------------------------------------------
|
||||
void FApplication::processResizeEvent() const
|
||||
{
|
||||
if ( ! FTerm::hasChangedTermSize() )
|
||||
if ( ! FTerm::hasChangedTermSize() ) // A SIGWINCH signal was received
|
||||
return;
|
||||
|
||||
FTerm::detectTermSize(); // Detect and save the current terminal size
|
||||
const auto& mouse = FTerm::getFMouseControl();
|
||||
mouse->setMaxWidth (uInt16(getDesktopWidth()));
|
||||
mouse->setMaxHeight (uInt16(getDesktopHeight()));
|
||||
|
|
|
@ -471,9 +471,7 @@ void FKeyboard::parseKeyBuffer()
|
|||
}
|
||||
|
||||
// Read the rest from the fifo buffer
|
||||
while ( ! isKeypressTimeout()
|
||||
&& fifo_offset > 0
|
||||
&& fkey != FKey::Incomplete )
|
||||
while ( fifo_offset > 0 && fkey != FKey::Incomplete )
|
||||
{
|
||||
fkey = parseKeyString();
|
||||
fkey = keyCorrection(fkey);
|
||||
|
|
|
@ -290,7 +290,6 @@ bool FVTerm::updateTerminal() const
|
|||
|
||||
std::size_t changedlines = 0;
|
||||
|
||||
|
||||
for (uInt y{0}; y < uInt(vterm->height); y++)
|
||||
{
|
||||
if ( updateTerminalLine(y) )
|
||||
|
@ -1082,7 +1081,7 @@ void FVTerm::putArea (const FPoint& pos, const FTermArea* area)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
int FVTerm::getLayer (FVTerm* obj)
|
||||
int FVTerm::getLayer (const FVTerm* obj)
|
||||
{
|
||||
// returns the layer from the FVTerm object
|
||||
|
||||
|
@ -2895,7 +2894,6 @@ inline bool FVTerm::isTermSizeChanged() const
|
|||
return false;
|
||||
|
||||
FObject::getCurrentTime (&last_term_size_check);
|
||||
|
||||
const auto& data = FTerm::getFTermData();
|
||||
|
||||
if ( ! data )
|
||||
|
|
|
@ -666,14 +666,14 @@ bool FWidget::setCursorPos (const FPoint& pos)
|
|||
|
||||
if ( area->hasOwner() )
|
||||
{
|
||||
const auto object = area->getOwner<FWidget*>();
|
||||
int woffsetX = getTermX() - object->getTermX();
|
||||
int woffsetY = getTermY() - object->getTermY();
|
||||
const auto area_owner = area->getOwner<FWidget*>();
|
||||
int woffsetX = getTermX() - area_owner->getTermX();
|
||||
int woffsetY = getTermY() - area_owner->getTermY();
|
||||
|
||||
if ( isChildPrintArea() )
|
||||
{
|
||||
woffsetX += (1 - object->getLeftPadding());
|
||||
woffsetY += (1 - object->getTopPadding());
|
||||
woffsetX += (1 - area_owner->getLeftPadding());
|
||||
woffsetY += (1 - area_owner->getTopPadding());
|
||||
}
|
||||
|
||||
bool visible = ! isCursorHideable() || flags.visible_cursor;
|
||||
|
@ -1941,7 +1941,7 @@ void FWidget::setWindowFocus (bool enable)
|
|||
if ( ! window->isWindowActive() )
|
||||
{
|
||||
bool has_raised = window->raiseWindow();
|
||||
window->setActiveWindow(window);
|
||||
FWindow::setActiveWindow(window);
|
||||
|
||||
if ( has_raised && window->isVisible() && window->isShown() )
|
||||
window->redraw();
|
||||
|
|
|
@ -857,7 +857,7 @@ int FWindow::getWindowLayerImpl (FWidget* obj)
|
|||
{
|
||||
// returns the window layer from the widget obj
|
||||
|
||||
FWidget* window;
|
||||
const FWidget* window;
|
||||
|
||||
if ( ! obj->isWindowWidget() )
|
||||
{
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
#include <fcntl.h>
|
||||
#include <langinfo.h>
|
||||
|
||||
#if F_HAVE_GETTTYNAM && F_HAVE_TTYENT_H
|
||||
#if defined(F_HAVE_GETTTYNAM) && defined(F_HAVE_TTYENT_H)
|
||||
#include <ttyent.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ class FVTerm
|
|||
static void getArea (const FRect&, const FTermArea*);
|
||||
void putArea (const FTermArea*) const;
|
||||
static void putArea (const FPoint&, const FTermArea*);
|
||||
static int getLayer (FVTerm*);
|
||||
static int getLayer (const FVTerm*);
|
||||
void scrollAreaForward (FTermArea*) const;
|
||||
void scrollAreaReverse (FTermArea*) const;
|
||||
void clearArea (FTermArea*, wchar_t = L' ') const;
|
||||
|
|
Loading…
Reference in New Issue