Autore: Hendrik Boom Data: To: dng Oggetto: Re: [DNG] Why X does keyboard and mouse.
On Fri, Jan 01, 2021 at 04:38:05PM +0000, Simon Hobson wrote: > Hendrik Boom <hendrik@???> wrote:
>
> >>>> It didn't have to be this way. In 2020, better alternatives could
> >>>> have been made. If I were the project manager, the first thing I'd
> >>>> do is uncouple keyboard, mouse and video from each other. Why X has
> >>>> anything to do with keyboard or mouse is beyond me.
> >>>
> >>> Perhaps because X was originally a means of having a graphical user
> >>> interface to multiple machines over a network. Which usualy involves
> >>> a screen, keyboard, and mouse.
> >>>
> >>> Each X window could be talking to a different computer. It mattered
> >>> which computer your keystrokes went to.
> >>
> >> Yes, but that doesn't preclude three or more separate pieces of
> >> software: One for the screen, one for the keyboard, and one for the
> >> mouse. There can be others as input devices are added. There could even
> >> be a struct that passes a pointer to each of those three (or more).
> >
> > The X server would still have to take the keystrokes, see which window was
> > active and sent those keystrokes to the remote machine using that window. That
> > connects them together.
>
> ...
>
> > But when the X inventors did this, they left out audio. I can connect to a
> > remote host, run a media player, and never hear the sound, because it's playing
> > on the remote host.
>
> In some ways that's an argument for doing some form of multiple streams - and multiplex them down one transport. That way, you implement the stream types you know about now, and when new ones come along (e.g. people now want audio rather than just a beep) then it can be easily added as an additional stream type.
I think that's what X does now -- it multiplexes several event streams.
But not, as far as I know, audio. Though I have heard of someone trying
that a while ago.
> Intelligent multiplexing should be able to retain the sequence of
> (e.g. key presses and mouse clicks), though I guess there's always the
> chance that processes could get scheduled in such a way that very
> closely spaced events might get re-ordered. Such an example could be
> if you hit a key and click the mouse together - but given the
> processing abilities of modern hardware, I think it would need to be
> "together" (from human response times PoV) for it to be a risk.
Indeed. At the lowest level, there are probably different device
drivers for mouse, keyboard, tracker ball, game console, and the like.
>
> But really it's a moot discussion. It didn't happen, and it's not likely to given the vested interests in pushing their own ideas these days.
I've heard that Wayland was to be able to operate over X. Whether that
actually works, or is to be dropped, I have no idea.