1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

Remove TermWin's is_minimised method.

Again, I've replaced it with a push-based notification going in the
other direction, so that when the terminal output stream includes a
query for 'is the window minimised?', the Terminal doesn't have to
consult the TermWin, because it already knows the answer.

The GTK API I'm using here (getting a GdkEventWindowState via
GtkWidget's window-state-event) is not present in GTK 1. The API I was
previously using (gdk_window_is_viewable) _is_, but it turns out that
that API doesn't reliably give the right answer: it only checks
visibility of GDK window ancestors, not X window ancestors. So in fact
GTK 1 PuTTY/pterm was only ever _pretending_ to reliably support the
'am I minimised' terminal query. Now it won't pretend any more.
This commit is contained in:
Simon Tatham
2021-02-07 19:59:20 +00:00
parent 42ad454f4f
commit 61571376cc
6 changed files with 26 additions and 25 deletions

View File

@ -1138,7 +1138,6 @@ struct TermWinVtable {
* the window it remembers whether to go back to normal or
* maximised. */
void (*set_minimised)(TermWin *, bool minimised);
bool (*is_minimised)(TermWin *);
void (*set_maximised)(TermWin *, bool maximised);
void (*move)(TermWin *, int x, int y);
void (*set_zorder)(TermWin *, bool top);
@ -1638,6 +1637,7 @@ void term_keyinput(Terminal *, int codepage, const void *buf, int len);
void term_keyinputw(Terminal *, const wchar_t * widebuf, int len);
void term_get_cursor_position(Terminal *term, int *x, int *y);
void term_setup_window_titles(Terminal *term, const char *title_hostname);
void term_notify_minimised(Terminal *term, bool minimised);
typedef enum SmallKeypadKey {
SKK_HOME, SKK_END, SKK_INSERT, SKK_DELETE, SKK_PGUP, SKK_PGDN,