masm11 / emacs

Mirror of GNU Emacs
http://www.gnu.org/software/emacs/
GNU General Public License v3.0
198 stars 14 forks source link

Remove pgtkconn, we no longer need it #8

Closed fejfighter closed 4 years ago

fejfighter commented 4 years ago

I had suspicions that this could be removed, it mostly relates to X11 rendering.

in this form Emacs becomes a glorified GTK3 widget, where gtk handles connections to the window-manager/compositor/whatever.

Less code means less to worry about

masm11 commented 4 years ago

pgtkconn has nothing to do with X11 rendering.

In the past, I needed SIGIO to interrupt with C-g while emacs was busy. I needed the file descriptor of the connection to call init_sigio().

I didn't like pgtkconn because it was ugly.

Afterward, I implemented hourglass using atimer.

The hourglass handler is called periodically, and keyboard events are handled at that moment, so I can interrupt busy emacs. I don't need pgtkconn now.

Could you remove int connection; in struct pgtk_display_info defined in pgtkterm.h to ensure it is no longer used?

Less code means less to worry about

Yes, I know.

fejfighter commented 4 years ago

I figured it was part of early stages of the port, but no longer necessary.

I think I got the rendering idea from https://www.facebook.com/notes/daniel-colascione/buttery-smooth-emacs/10155313440066102 which talks about using it for redisplay.

I have removed int connection, I forgot the display info struct was per windowing type and not shared like frame.

masm11 commented 4 years ago

Thank you!

masm11 commented 4 years ago

@fejfighter You may be aware, but text cursor blinking is not stable after merging this PR. Can you debug that? I'm also debugging.

fejfighter commented 4 years ago

@masm11 now that you mention it, I have now noticed. I was pulled away from that code yesterday.

I'll debug today.

should this be reverted until it's fixed?