windowmaker-wl/tools/wm-port/logs/F.2.log

149 lines
6.7 KiB
Plaintext

user: You are executing a mechanical Wayland porting task for WindowMaker.
# Task: F.2 (Verification only)
## Task Description (from ACTION_PLAN.md)
### F.2 Verify `RCreateContextWayland()` completeness
- **File**: `wrlib/context.c:725-775`
- **Operation**: Read `RCreateContextWayland()`. Verify it sets all fields that `RConvertImage` and image loaders need: `depth`, `vclass`, `red_offset`, `green_offset`, `blue_offset`, `black`, `white`, `convert_image`, `convert_image_mask`. Verify `dpy`, `cmap`, `copy_gc`, `visual`, `drawable` are NULL/0.
- **Test**: Call `RCreateContextWayland(1920, 1080, NULL)`, then `RLoadImage(ctx, "test.png", 0)`, then `RConvertImage(ctx, img, &pixmap)`. Confirm the pixmap is a `pixman_image_t*` cast to `Pixmap`.
- **Blocked by**: nothing
## Procedure (Template 9)
**Use for**: F.2, F.3, F.4, G.1, I.1, I.2, C.3, H.5, and any verification task
```
TASK: Verify that {{FILE}} has no X11 dependencies that would break on the
Wayland backend.
STEPS:
1. Run: `grep -nE '\bX[A-Z][a-z]' {{FILE}}`
This finds direct Xlib function calls.
EXPECTED: {{EXPECTED_XLIB_COUNT}} matches.
2. Run: `grep -nE '\bDisplay\b|\bXEvent\b|\bXImage\b|\bXColor\b' {{FILE}}`
This finds X11 type usage.
EXPECTED: {{EXPECTED_TYPE_COUNT}} matches.
3. Run: `grep -n '_x11_raw' {{FILE}}`
This finds raw event escape hatches.
EXPECTED: 0 matches.
4. Run: `grep -n '#ifdef.*USE_X\|#ifdef.*HAVE_X\|#ifdef.*XINERAMA\|#ifdef.*XSHAPE\|#ifdef.*XDND' {{FILE}}`
This finds X11 feature guards.
EXPECTED: {{EXPECTED_IFDEF_COUNT}} matches.
5. If any count exceeds expected:
- For each unexpected match, report the line number and the X11 reference.
- Classify as: (a) actual dependency, (b) comment/string, (c) type used
but never passed to Xlib.
REPORT FORMAT:
```
FILE: {{FILE}}
Xlib calls: N (expected {{EXPECTED_XLIB_COUNT}})
X11 types: N (expected {{EXPECTED_TYPE_COUNT}})
_x11_raw: N (expected 0)
#ifdef guards: N (expected {{EXPECTED_IFDEF_COUNT}})
STATUS: CLEAN / NEEDS WORK
ISSUES: (list any unexpected findings)
```
CONSTRAINTS:
- Do NOT modify the file. This is a read-only verification task.
- Report findings exactly. Do not interpret or fix.
```
## Reference Tables (embed in every prompt)
### X11 Event Type → WMEvent Type
```
KeyPress/KeyRelease → WME_KEY_PRESS/WME_KEY_RELEASE → event->u.key.*
ButtonPress/ButtonRelease → WME_BUTTON_PRESS/WME_BUTTON_RELEASE → event->u.button.*
MotionNotify → WME_MOTION → event->u.motion.*
EnterNotify/LeaveNotify → WME_ENTER/WME_LEAVE → event->u.crossing.*
Expose → WME_EXPOSE → event->u.expose.*
ConfigureNotify → WME_CONFIGURE → event->u.configure.*
ConfigureRequest → WME_CONFIGURE_REQUEST → event->u.configureRequest.*
MapNotify → WME_MAP → event->u.lifecycle.*
MapRequest → WME_MAP_REQUEST → event->u.mapRequest.*
UnmapNotify → WME_UNMAP → event->u.lifecycle.*
DestroyNotify → WME_DESTROY → event->u.lifecycle.*
FocusIn/FocusOut → WME_FOCUS_IN/WME_FOCUS_OUT → event->u.focus.*
PropertyNotify → WME_PROPERTY → event->u.property.*
ClientMessage → WME_CLIENT_MESSAGE → event->u.clientMessage.*
SelectionNotify → WME_SELECTION → event->u.selection.*
SelectionRequest → WME_SELECTION_REQUEST → event->u.selection.* (check)
SelectionClear → WME_SELECTION_CLEAR → event->u.selection.* (check)
VisibilityNotify → WME_VISIBILITY → event->u.visibility.*
ColormapNotify → WME_COLORMAP → event->u.colormap.*
MappingNotify → WME_MAPPING → event->u.mapping.*
ReparentNotify → WME_REPARENT → event->u.reparent.*
```
### X11 Event Field → WMEvent Field
```
event->xkey.keycode → event->u.key.keycode
event->xkey.state → event->u.key.state
event->xkey.time → event->u.key.time
event->xkey.window → event->u.key.window
event->xkey.x, y → event->u.key.x, y
event->xkey.x_root → event->u.key.x_root
event->xbutton.button → event->u.button.button
event->xbutton.state → event->u.button.state
event->xbutton.time → event->u.button.time
event->xbutton.window → event->u.button.window
event->xbutton.x, y → event->u.button.x, y
event->xbutton.x_root → event->u.button.x_root
event->xmotion.state → event->u.motion.state
event->xmotion.time → event->u.motion.time
event->xmotion.window → event->u.motion.window
event->xmotion.x, y → event->u.motion.x, y
event->xmotion.x_root → event->u.motion.x_root
event->xcrossing.window → event->u.crossing.window
event->xcrossing.state → event->u.crossing.state
event->xcrossing.time → event->u.crossing.time
event->xcrossing.mode → event->u.crossing.mode
event->xcrossing.detail → event->u.crossing.detail
event->xconfigure.window → event->u.configure.window
event->xconfigure.x, y → event->u.configure.x, y
event->xconfigure.width → event->u.configure.width
event->xconfigure.height → event->u.configure.height
event->xclient.data.l[N] → event->u.clientMessage.data.l[N]
event->xclient.message_type → event->u.clientMessage.atom
event->xclient.window → event->u.clientMessage.window
event->xproperty.atom → event->u.property.atom
event->xproperty.time → event->u.property.time
event->xproperty.window → event->u.property.window
```
---
## Important Rules
1. Work in the git repository at /home/lkn/src/WindowMaker-0.96.0. Create a git branch named "port/F.2" before making changes.
2. Make exactly the changes described. No more, no less.
3. After making changes, verify with the grep commands in the template.
4. Attempt to compile with: cd /home/lkn/src/WindowMaker-0.96.0 && make -j$(nproc) 2>&1 | tail -30
5. If compilation fails, fix the errors. If you cannot fix them, revert and report.
6. If you hit a STOP condition (missing vtable slot, missing API), revert changes and report exactly what is missing.
7. When done, run: git add -A && git diff --cached --stat
8. Report the final status as one of:
- DONE: task completed, compiles clean
- STOP: blocked on <reason>
- FAIL: could not complete because <reason>
Line numbers in ACTION_PLAN.md may have drifted. Use grep to find current line numbers before editing.