emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Touchscreen support


From: Po Lu
Subject: Re: Touchscreen support
Date: Sat, 15 Jan 2022 08:48:03 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

I agree with what you said in the general sense, but you got some
details wrong:

> In general, the currently-used toolkits have raised the floor of the
> "stamp of approval" abstraction layer. As a (somewhat contrived)
> example, once upon a time one might have used xmh to read email. It
> was an X application that used the Athena Widgets and also could use
> the 3D Athena widgets, so in terms of code, you would see X, XAW, and
> XA3D calls.

Inaccurate comparison: the X tookit intrinstics are not intended to
abstract away X, so you're always supposed to (and even encouraged to)
use X to do things.

> These days, one might instead use a GTK4 or QT mail reader, and those
> toolkits would only "promise support" for code that made gtk or qt
> calls; the programmer isn't exactly prohibited from using X11 calls,
> but doing so is not recommended nor supported, and if the programmer
> runs into trouble, they are very likely to be told "you're breaking
> the abstraction barrier we set; remove it and then come back with your
> problem". (This is more or less exactly the situation that created
> these lines in xterm.c:)

>  #ifdef USE_GTK
>        /* A long-standing GTK bug prevents proper disconnect handling
>  <https://gitlab.gnome.org/GNOME/gtk/issues/221>.  Once,
>  the resulting Glib error message loop filled a user's disk.
>  To avoid this, kill Emacs unconditionally on disconnect.  */
>        shut_down_emacs (0, Qnil);
>        fprintf (stderr, "%s\n\
>  When compiled with GTK, Emacs cannot recover from X disconnects.\n\
>  This is a GTK bug: https://gitlab.gnome.org/GNOME/gtk/issues/221\n\
>  For details, see etc/PROBLEMS.\n",
>        error_msg);
>        emacs_abort ();
>  #endif /* USE_GTK */

That is a rather bad example as well: GTK can't handle a display
closing, even if you use the GTK-provided abstraction layer
(GdkDisplayManager, etc) to open and close multiple displays.  It's just
a bug in their code that they have no interest in fixing, since multiple
display support is of no interest to every program but Emacs.

x_wm_set_size_hint in gtkutil.c would be a better example, IMO.

Thanks.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]