windowmaker-wl/WINGs
lkn d29f2a29c9 wayland: fix close/iconify buttons and miniwindow rendering
Three bugs fixed:

1. Close and iconify buttons broken after frame rendering model change
   Buttons are composited into the titlebar buffer, so their scene_buf
   nodes carry no committed buffer and are invisible to wlr_scene_node_at.
   frame_buf_at() returned the titlebar fb for all button-area clicks,
   routing them to titlebarMouseDown instead of buttonMouseDown.

   Fix: add frame_buf_button_at() -- coordinate walk of frame_list entries
   with scene_buf->buffer == NULL -- and frame_buf_hit() which tries button
   resolution first then falls back to the scene graph. Replace all
   frame_buf_at() calls in button and motion handlers with frame_buf_hit().
   Also emit synthetic WME_LEAVE/WME_ENTER events on sub-window boundary
   crossings so buttonMouseDown's press-track loop works correctly.

2. Iconify crash (SIGSEGV in update_icon_title)
   WMDrawString() was passed icon->core->window (a frame_buf synthetic ID,
   0x10000000+) as the drawable. wl_font_resolve_drawable() only recognised
   WINGs view IDs (0x20000000+), so it cast the frame_buf ID directly as a
   pixman_image_t* -- wild pointer -- SIGSEGV.

   Fix: add W_RegisterBacking()/W_UnregisterBacking() to wview_wl.c.
   Register each frame_buf's pixman image in the backing table on creation
   and unregister on destroy. Extend the ID range check in wfont_wl.c and
   wrender_wl.c from 0x20000000 down to 0x10000000 so frame_buf IDs resolve
   correctly via W_GetViewBacking().

3. Resizebar visible after iconify + miniwindow not rendering
   wl_window_unmap() disabled fb->scene_buf->node individually, but a
   subsequent wl_frame_paint() could re-enable and re-commit it while the
   window was still iconified.

   Fix: for top-level frames, disable fb->tree->node -- hides the entire
   scene tree (frame buffer, titlebar, resizebar, client surface) atomically.
   Symmetric enable in wl_window_map().

   Miniwindow icons were invisible: icon_paint was a noop so the frame_buf
   image was never committed to the scene graph. Add wl_icon_paint() mirroring
   wl_appicon_paint(): tile + file_image composite + title text, committed
   via wlr_scene_buffer_set_buffer(). Wire into wIconPaint() in icon.c so
   the backend finalises the surface after policy-layer setup.
2026-05-15 09:49:06 +02:00
..
Documentation gitignore: stop tracking all generated build outputs 2026-03-31 13:36:58 +02:00
Examples gitignore: stop tracking all generated build outputs 2026-03-31 13:36:58 +02:00
Extras WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
Resources gitignore: stop tracking all generated build outputs 2026-03-31 13:36:58 +02:00
Tests gitignore: stop tracking all generated build outputs 2026-03-31 13:36:58 +02:00
WINGs WINGs/wevent: remove _x11_raw from WMHandleEvent dispatch path 2026-05-14 20:24:05 +02:00
po gitignore: stop tracking all generated build outputs 2026-03-31 13:36:58 +02:00
BUGS WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
ChangeLog WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
Makefile.am Phase 80: eliminate all 43 if(!dpy) return guards via vtable dispatch 2026-05-13 10:01:57 +02:00
NEWS WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
README WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
TODO WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
array.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
bagtree.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
configuration.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
data.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
dragcommon.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
dragdestination.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
dragsource.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
error.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
error.h WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
findfile.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
handlers.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
hashtable.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
make-rgb WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
memory.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
menuparser.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
menuparser.h WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
menuparser_macros.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
misc.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
notification.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
proplist.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
rgb.h WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
selection.c fix build: add missing WINGs vtable fields, fix double-free and linker errors 2026-05-14 16:24:59 +02:00
string.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
tree.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
userdefaults.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
userdefaults.h WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
usleep.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
wapplication.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
wappresource.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
wballoon.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wbox.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wbrowser.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wbutton.c WINGs: move updateDisabledMask to render backend vtable 2026-05-14 17:58:33 +02:00
wcolor.c Phase 80: eliminate all 43 if(!dpy) return guards via vtable dispatch 2026-05-13 10:01:57 +02:00
wcolor_wl.c Phase 80: eliminate all 43 if(!dpy) return guards via vtable dispatch 2026-05-13 10:01:57 +02:00
wcolor_x11.c Phase 80: eliminate all 43 if(!dpy) return guards via vtable dispatch 2026-05-13 10:01:57 +02:00
wcolorpanel.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wcolorwell.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wconfig.h WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
wevent.c WINGs/wevent: remove _x11_raw from WMHandleEvent dispatch path 2026-05-14 20:24:05 +02:00
wevent_wl.c WINGs/wevent: remove _x11_raw from WMHandleEvent dispatch path 2026-05-14 20:24:05 +02:00
wevent_x11.c wl_backend: fix unshade — re-enable and raise client surface and frame 2026-05-14 22:26:07 +02:00
wfilepanel.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wfont.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wfont_wl.c wayland: fix close/iconify buttons and miniwindow rendering 2026-05-15 09:49:06 +02:00
wfont_x11.c Implement keyboard input via font backend abstraction 2026-05-13 21:43:24 +02:00
wfontpanel.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
wframe.c WINGs/wframe: remove X11 GC/region clipping from paintFrame 2026-05-14 16:44:29 +02:00
widgets.c wl_backend: fix unshade — re-enable and raise client surface and frame 2026-05-14 22:26:07 +02:00
winputmethod.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wlabel.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wlist.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wmenuitem.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
wmisc.c WINGs/wevent: remove _x11_raw from WMHandleEvent dispatch path 2026-05-14 20:24:05 +02:00
wpanel.c WINGs/wpanel: use WMEvent keysym instead of XLookupString 2026-05-14 16:47:07 +02:00
wpixmap.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wpopupbutton.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wprogressindicator.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wrender_wl.c wayland: fix close/iconify buttons and miniwindow rendering 2026-05-15 09:49:06 +02:00
wrender_x11.c WINGs: move updateDisabledMask to render backend vtable 2026-05-14 17:58:33 +02:00
wruler.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wscroller.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wscrollview.c WINGs/wevent: remove _x11_raw from WMHandleEvent dispatch path 2026-05-14 20:24:05 +02:00
wslider.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wsplitview.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wtabview.c WIP: Wayland backend - fix atoms, OR surface compositing, frame/window ops 2026-05-13 07:05:22 +02:00
wtext.c WINGs/wevent: remove _x11_raw from WMHandleEvent dispatch path 2026-05-14 20:24:05 +02:00
wtextfield.c Implement keyboard input via font backend abstraction 2026-05-13 21:43:24 +02:00
wutil.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
wview.c wl_backend: fix unshade — re-enable and raise client surface and frame 2026-05-14 22:26:07 +02:00
wview_wl.c wayland: fix close/iconify buttons and miniwindow rendering 2026-05-15 09:49:06 +02:00
wview_x11.c WINGs/wevent: remove _x11_raw from WMHandleEvent dispatch path 2026-05-14 20:24:05 +02:00
wwindow.c WINGs/wevent: remove _x11_raw from WMHandleEvent dispatch path 2026-05-14 20:24:05 +02:00

README

                      WINGs - WINGs Is Not GNUstep

                                   by

                          Alfredo Kengi Kojima

                          kojima@windowmaker.info


   WINGs is a small widget set with the N*XTSTEP look and feel. Its API
is inspired in OpenStep and its implementation borrows some ideas
from Tk. It has a reasonable set of widgets, sufficient for building
small applications (like a CDPlayer or hacking something like rxvt). It
also has other functions that are usefull for applications, like a
User Defaults alike configuration manager and a notification system.

   The library is limited and its design is a little sloppy,
so it's not intended to build large or complex applications, like
anything more complex than a CDPlayer. GNUstep should be used for such
applications.

   Since WINGs is written in C and is sort of low-level it is small
and faster than say, Motif or even Athena. Knowing Xlib will help you to
workaround some of its limitations, although you'll probably be able to
write something like a trivial tic-tac-toe game without knowing much Xlib.

   Some of its functions are designed to support the Window Maker window
manager (see http://windowmaker.info) In fact, its primary role is to
support Window Maker. All other uses of it are just an added bonus.

   It will help you to understand the API if you read the ApplicationKit
reference manual, distributed as a PDF by Apple. The function names,
structs and most of the intrinsics are very close to OpenStep classes.


Internationalization:
---------------------

    Change ~/GNUstep/Defaults/WMGLOBAL to set the desired font set and
set MultiByteText = YES; to enable support for multibyte text.


Widgets provided by WINGs:
--------------------------

- button (command button, radio, switch etc. - all buttons defined in OpenStep)
- label
- textfield
- frame
- window
- popup menu button
- scroller
- selection list
- browser
- slider
- scrollable view
- color well
- split view
- tabbed view
- progress indicator

- selection (make pasteboard like?)
- drag&drop

- input box
- file panel
- color panel
- alert panel
- font panel

If you think you can code the following, please do. They are needed by
WPrefs.app, but the number of other things I have to do is huge.

- input method support (XIM). I have no idea of how to code it. People who use
different characters than ASCII will have trouble editing menus without it...


Wish list: (I don't have the know-how or time to do them)
---------------------------------------------------------

- text (with support for RTF)
- matrix (like NSMatrix)
- font manager (like NSFontManager)
- finish other wigets
- optimize list scrolling (XCopyArea() the area that's already drawn)
- InterfaceMaker?
- use XSetWMName and XSetWMIconName for the window/icon title setting.
  This requires transforming the received text to a text property with
  the proper encoding.

Copyright
---------

WINGs is copyright (c) Alfredo K. Kojima and is licensed through the GNU
Library General Public License (LGPL).