Hi Guys,
I've spent the last few days cleaning up the x11 front-end. You can find the changes here (it's not on a branch - I'll be paying the price for that later I'm sure)
In a nutshell:
The double-linked mapping between the Angband term structure and the x11 term data structure has been removed (this is a fairly significant change) - Now, an x11_term_data structure is allocated and assigned to term->data during term_data_init() - I believe this to be a much cleaner (and more in the spirit of having the data pointer in the term structure). The Angband term structures themselves are allocated in init_x11().
The x11 frontend is poised for a complete removal of the ANGBAND_TERM_MAX window limit, but that is going to impact violently on the Mac and SDL front ends (but not Windows???)
Anyway, take a look at what I've done - I'm more than happy to take the reigns of the x11 front end and fixing any bugs in it
I've spent the last few days cleaning up the x11 front-end. You can find the changes here (it's not on a branch - I'll be paying the price for that later I'm sure)
In a nutshell:
- MAJOR update of the coding style - the code is barely recognisable, but how it actually works has barely changed
- Split the core X11 handling (anything to do with Display or Window) into x11-util.[h,c] - most of the functions here are x11_[display, window, color, font]_xxx(). There are a few ragedy names that still need a little finessing
- All those ugly global have been removed
- The Angband Term interface functions are now all x11_term_xxx()
- Saving of window positions has been restored
- The ALT modifier now works!!!
- Lots of redundant/spurious/legacy code has been stripped out completely
The double-linked mapping between the Angband term structure and the x11 term data structure has been removed (this is a fairly significant change) - Now, an x11_term_data structure is allocated and assigned to term->data during term_data_init() - I believe this to be a much cleaner (and more in the spirit of having the data pointer in the term structure). The Angband term structures themselves are allocated in init_x11().
The x11 frontend is poised for a complete removal of the ANGBAND_TERM_MAX window limit, but that is going to impact violently on the Mac and SDL front ends (but not Windows???)
Anyway, take a look at what I've done - I'm more than happy to take the reigns of the x11 front end and fixing any bugs in it
Comment