[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] Using a display_info union instead of a typedef Display_Info
From: |
Eli Zaretskii |
Subject: |
Re: [RFC] Using a display_info union instead of a typedef Display_Info |
Date: |
Fri, 12 Apr 2019 22:23:12 +0300 |
> From: Alex Gramiak <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Fri, 12 Apr 2019 12:40:45 -0600
>
> > Looks to me like replacing one set of window-system specific code with
> > another: still the same #ifdef's and the same window-system specific
> > code fragments. Maybe I'm missing something, but it doesn't look to
> > me like a change for the better.
>
> There will always have to be window-system specific code somewhere. The
> difference with this patch is that the changed parts of the code will be
> able to be used by multiple different window systems. That is to say, I
> believe this is a necessary step towards Stefan's goal of using multiple
> window systems simultaneously.
>
> Note how before there was the implicit conditional compilation regarding
> the definition of check_x_display_info and x_get_arg that allowed the
> procedure to be used by _only_ 1 window system, but decode_display_info
> and gui_display_get_arg would be able to handle _all_ graphical window
> systems that Emacs is built with.
>
> This currently doesn't mean any functional change as that number can
> currently only be 1, but it would be nice for that to change. Again, I
> believe this is (part of) the way to do so.
We've been through this before: if these changes don't come together
with, or closely followed by, the code to support using several
window-systems in the same session, I'd prefer not to make these
changes at this time. The advantages you describe are at this point
theoretical, whereas the disadvantage -- making the code less familiar
for veteran Emacs hackers -- is very real.
Let's invest our time and energy in making changes that are useful
today, not in some distant future.
> To show how it's used, I've included a diff that uses
> decode_display_info to simplify all 3 check_x_display_info
> implementations into a single conditional. (I could remove that
> conditional with another terminal hook, but I'm not sure that's worth
> it).
There's a way to attain that without the massive changes you propose:
just make a single function which dispatches by the type of
output_data. We won't be able to judge which alternative is better
until and unless we have real code which implements this feature.
Thanks.
- [RFC] Using a display_info union instead of a typedef Display_Info, Alex Gramiak, 2019/04/12
- Re: [RFC] Using a display_info union instead of a typedef Display_Info, Alex Gramiak, 2019/04/12
- Re: [RFC] Using a display_info union instead of a typedef Display_Info, Eli Zaretskii, 2019/04/12
- Re: [RFC] Using a display_info union instead of a typedef Display_Info, Alex Gramiak, 2019/04/12
- Re: [RFC] Using a display_info union instead of a typedef Display_Info,
Eli Zaretskii <=
- Re: [RFC] Using a display_info union instead of a typedef Display_Info, Daniel Colascione, 2019/04/12
- Re: [RFC] Using a display_info union instead of a typedef Display_Info, Eli Zaretskii, 2019/04/12
- Re: [RFC] Using a display_info union instead of a typedef Display_Info, Daniel Colascione, 2019/04/12
- Re: [RFC] Using a display_info union instead of a typedef Display_Info, Eli Zaretskii, 2019/04/12
- Re: [RFC] Using a display_info union instead of a typedef Display_Info, Richard Stallman, 2019/04/13