The x11 SIGWINCH handler caused more problems than it solved.

This commit is contained in:
William McBrine
2019-07-27 20:04:35 -04:00
parent 985e8439c1
commit c17e778160
6 changed files with 2 additions and 55 deletions

View File

@@ -208,10 +208,6 @@ static int _setup_curses(void)
XC_LOG(("cursesprocess exiting from Xinitscr\n"));
/* Always trap SIGWINCH if the C library supports SIGWINCH */
XCursesSetSignal(SIGWINCH, XCursesSigwinchHandler);
atexit(XCursesExit);
return OK;

View File

@@ -135,7 +135,6 @@ int XC_read_socket(int, void *, int);
int XC_write_display_socket_int(int);
int XCursesSetupX(int argc, char *argv[]);
void XCursesSigwinchHandler(int signo);
#ifdef _HPUX_SOURCE
# define FD_SET_CAST int *

View File

@@ -505,23 +505,6 @@ signal_handler XCursesSetSignal(int signo, signal_handler action)
#endif
}
void XCursesSigwinchHandler(int signo)
{
PDC_LOG(("%s:XCursesSigwinchHandler() - called: SIGNO: %d\n",
XCLOGMSG, signo));
/* Patch by: Georg Fuchs, georg.fuchs@rz.uni-regensburg.de
02-Feb-1999 */
SP->resized += 1;
/* Always trap SIGWINCH if the C library supports SIGWINCH */
#ifdef SIGWINCH
XCursesSetSignal(SIGWINCH, XCursesSigwinchHandler);
#endif
}
/* Convert character positions x and y to pixel positions, stored in
xpos and ypos */
@@ -2670,19 +2653,15 @@ static void _handle_structure_notify(Widget w, XtPointer client_data,
XC_LOG(("ConfigureNotify received\n"));
/* Window has been resized, change width and height to send to
place_text and place_graphics in next Expose. Also will need
to kill (SIGWINCH) curses process if screen size changes. */
place_text and place_graphics in next Expose. */
resize_window_width = event->xconfigure.width;
resize_window_height = event->xconfigure.height;
after_first_curses_request = FALSE;
#ifdef SIGWINCH
SP->resized = 1;
kill(xc_otherpid, SIGWINCH);
#endif
_send_key_to_curses(KEY_RESIZE, NULL, TRUE);
break;

View File

@@ -60,10 +60,6 @@ static int _setup_curses(void)
LINES = XCursesLINES - SP->linesrippedoff - SP->slklines;
XCursesCOLS = COLS = SP->cols;
/* Always trap SIGWINCH if the C library supports SIGWINCH */
XCursesSetSignal(SIGWINCH, XCursesSigwinchHandler);
atexit(XCursesExit);
return OK;

View File

@@ -131,7 +131,6 @@ unsigned long XCursesMouse(XEvent *);
int XCursesInitscr(int, char **);
int XCursesSetupX(int argc, char *argv[]);
void XCursesSigwinchHandler(int signo);
#ifdef _HPUX_SOURCE
# define FD_SET_CAST int *

View File

@@ -503,23 +503,6 @@ signal_handler XCursesSetSignal(int signo, signal_handler action)
#endif
}
void XCursesSigwinchHandler(int signo)
{
PDC_LOG(("%s:XCursesSigwinchHandler() - called: SIGNO: %d\n",
XCLOGMSG, signo));
/* Patch by: Georg Fuchs, georg.fuchs@rz.uni-regensburg.de
02-Feb-1999 */
SP->resized += 1;
/* Always trap SIGWINCH if the C library supports SIGWINCH */
#ifdef SIGWINCH
XCursesSetSignal(SIGWINCH, XCursesSigwinchHandler);
#endif
}
/* Convert character positions x and y to pixel positions, stored in
xpos and ypos */
@@ -2354,17 +2337,12 @@ static void _handle_structure_notify(Widget w, XtPointer client_data,
XC_LOG(("ConfigureNotify received\n"));
/* Window has been resized, change width and height to send to
place_text and place_graphics in next Expose. Also will need
to kill (SIGWINCH) curses process if screen size changes. */
place_text and place_graphics in next Expose. */
resize_window_width = event->xconfigure.width;
resize_window_height = event->xconfigure.height;
#ifdef SIGWINCH
SP->resized = 1;
#endif
//_send_key_to_curses(KEY_RESIZE, NULL, TRUE);
xc_resize_now = TRUE;
break;