Commit Graph

9497 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult b97b378af4 xfree86: shadowfb: use CloseScreen hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new screen close notify hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:46:27 +02:00
Enrico Weigelt, metux IT consult da21e09c2d xfree86: cursor: use CloseScreen hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new screen close notify hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:46:24 +02:00
Enrico Weigelt, metux IT consult 866afe931a xfree86: crtc: use CloseScreen hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new screen close notify hook instead.

This one doesn't look so trivial at first glance, but I've checked that
other functions called by xf86CrtcCloseScreen() just free'ing up some
memory and removing the CRTCs from some lists - thus a change in
execution order really shouldn't matter at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:46:20 +02:00
Enrico Weigelt, metux IT consult cc847cc43a xfree86: exa: use CloseScreen hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new screen close notify hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:46:17 +02:00
Enrico Weigelt, metux IT consult 0bfea99672 xfree86: xvmc: use CloseScreen hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new screen close notify hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:46:15 +02:00
Enrico Weigelt, metux IT consult 743c35c562 xfree86: xv: use CloseScreen hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new screen close notify hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:46:12 +02:00
Enrico Weigelt, metux IT consult 0fb851e46f xfree86: sbus: use CloseScreen hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new screen close notify hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:46:08 +02:00
Enrico Weigelt, metux IT consult 57b9155a7d xfree86: fbman: use CloseScreen hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new screen close notify hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:46:05 +02:00
Enrico Weigelt, metux IT consult 0c39ca358e xfree86: cmap: use CloseScreen hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new screen close notify hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:46:02 +02:00
Enrico Weigelt, metux IT consult b0f1bc92e5 xfree86: randr: use CloseScreen hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new screen close notify hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:45:59 +02:00
Enrico Weigelt, metux IT consult 623171ce3f xfree86: dga: use CloseScreen hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new screen close notify hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:45:56 +02:00
Enrico Weigelt, metux IT consult 710079a334 xwayland: use CloseScreen hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new screen close notify hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:45:38 +02:00
Enrico Weigelt, metux IT consult c5780c4c35 dix: add per-screen close notify hook
Right now, extension specific actions on screen closing implemented by wrapping
the ScreenRec's PositionWindow() proc pointer: the extensions are storing the
original pointer in their private data and putting in their own one. On each
call, their proc restores the original one, calls it, and switches back again.
When multiple extensions doing so, they're forming a kind of daisy chain.
(the same is done for lots of other procs)

While that approach is looking nice and elegant on the drawing board, it's
complicated, dangerous like a chainsaw and makes debugging hard, leading to
pretty blurred API borders.

This commit introduces a simple approach for letting extension hook into the
screen closing path safely, w/o having to care much about side effects with
the call chain. Extensions now can simply register their hook proc (and an
opaque pointer) and get called back - w/o ever having to mess with the
ScreenRec's internal structures. These hooks are called before the original
vector (usually handled by DDX/screen driver directly) is called.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:44:41 +02:00
Enrico Weigelt, metux IT consult 6967c0033c xwayland: use window destructor hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new window destructor hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:44:30 +02:00
Enrico Weigelt, metux IT consult 0a50759af4 xfree86: dri: use window destructor hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new window destructor hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:44:27 +02:00
Enrico Weigelt, metux IT consult b60581e393 xfree86: xv: use window destructor hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new window destructor hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:44:24 +02:00
Enrico Weigelt, metux IT consult 06b1f9e2c0 kdrive: xv: use window destructor hook
Wrapping ScreenRec's function pointers is problematic for many reasons,
so use the new window destructor hook instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:44:22 +02:00
Enrico Weigelt, metux IT consult 9266733da3 xwin: fix missing include of mi/mi_priv.h
xwin relies on mi_priv.h being included indirectly, thus depending
on exact include within other header files. This can easily break if
something in other headers slightly changes.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:43:20 +02:00
Enrico Weigelt, metux IT consult d1e641739b xfree86: unexport xf86RandR12CreateScreenResources()
Not used by any drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:43:14 +02:00
Enrico Weigelt, metux IT consult 7b8a5c4a72 xfree86: unexport xf86RandR12CloseScreen()
Not used by any drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:43:11 +02:00
Enrico Weigelt, metux IT consult 1a97ed88cc kdrive: drop obsolete ifndef PHOENIX
The symbol isn't set anywhere, and git history didn't show anything
were it ever had been set, thus no need to keep this.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:43:06 +02:00
Enrico Weigelt, metux IT consult a444407473 kdrive: call miCreateScreenResources() drectly
No need for complicated wrapping/unwrapping: it's always just
miCreateResources() anyway - so we can call it directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:43:03 +02:00
Enrico Weigelt, metux IT consult 981ee4fcf1 kdrive: directly calling KdCloseScreen() instead of wrapping
No need to wrap CloseScreen proc vector, we can call KdCloseScreen() from
KdXVCloseScreen() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:43:00 +02:00
Enrico Weigelt, metux IT consult d04872f8c4 kdrive: directly calling fbCloseScreen instead of wrapping
No need to wrap CloseScreen proc vector, we can call fbCloseScreen() from
KdCloseScreen() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:42:57 +02:00
Enrico Weigelt, metux IT consult c839203c8c xwayland: call miCreateScreenResources() directly
No need for complicated wrapping/unwrapping: it's always just
miCreateResources() anyway - so we can call it directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:42:55 +02:00
Enrico Weigelt, metux IT consult fbc1300cbc xwin: call miCreateScreenResources() directly
No need for complicated wrapping/unwrapping: it's always just
miCreateResources() anyway - so we can call it directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:42:52 +02:00
Enrico Weigelt, metux IT consult 61ac63e8df xwin: drop wrapping on ScreenRec->ModifyPixmapHeader()
Instead of complicated wrapping, just call fbModifyPixmapHeader() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:42:49 +02:00
Enrico Weigelt, metux IT consult 1758b94520 xwin: drop winResizeWindowMultiWindow()
This wrapping function for Screen->ResizeWindow() is does nothing more than
just call the original functions. So no need to keep wrapping it at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:42:46 +02:00
Enrico Weigelt, metux IT consult 6d8713b6a7 xwin: drop wrapping on ScreenRec->MoveWindow()
Instead of complicated wrapping, just call fbMoveWindow() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:42:43 +02:00
Enrico Weigelt, metux IT consult 0356a26d9f xwin: drop wrapping on ScreenRec->RestackWindow()
This proc vector is optional (callers check for non-null) and neither fb nor
mi set it, so we can just assign our function directly. No need for wrapping.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:42:41 +02:00
Enrico Weigelt, metux IT consult a698ebe1f8 xwin: drop wrapping on ScreenRec->ReparentWindow()
This proc vector is optional (callers check for non-null) and neither fb nor
mi set it, so we can just assign our function directly. No need for wrapping.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:42:38 +02:00
Enrico Weigelt, metux IT consult 41531e8220 xwin: drop wrapping on ScreenRec->UnrealizeWindow()
Instead of complicated wrapping, just call fbUnrealizeWindow() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:42:35 +02:00
Enrico Weigelt, metux IT consult 0dfe79f9da xwin: drop wrapping on ScreenRec->RealizeWindow()
Instead of complicated wrapping, just call fbRealizeWindow() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:42:32 +02:00
Enrico Weigelt, metux IT consult 7e84650e52 xwin: drop wrapping on ScreenRec->SetShape()
Instead of complicated wrapping, just call fbSetShape() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:42:30 +02:00
Enrico Weigelt, metux IT consult 6bcfef8cfa xwin: drop winCopyWindowMultiWindow()
This wrapping function for Screen->CopyWindow() is does nothing more than
just call the original functions. So no need to keep wrapping it at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:42:26 +02:00
Enrico Weigelt, metux IT consult dce437bb53 xwin: call winFinishScreenInitFB() directly
Both engines, GDI as well as DirectDraw, using the same screen init finish function,
so no need to keep indirection via per-engine callback pointer.

The winFinishScreenInitFB() can also be made static now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:42:24 +02:00
Enrico Weigelt, metux IT consult 7cbb183721 xwin: glx: drop glxWinUnrealizeWindow()
It does nothing more than just calling the original/wrapped function,
so we don't need that at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:42:20 +02:00
Enrico Weigelt, metux IT consult 20aec694e4 xwin: glx: drop glxWinRealizeWindow()
It does nothing more than just calling the original/wrapped function,
so we don't need that at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:41:53 +02:00
Enrico Weigelt, metux IT consult 1b990d3c0c xwin: drop wrapping on ScreenRec->ChangeWindowAttributes()
Instead of complicated wrapping, just call fbCreateWindow directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:41:51 +02:00
Enrico Weigelt, metux IT consult acbb76fd70 xwin: drop wrapping on ScreenRec->CreateWindow()
Instead of complicated wrapping, just call fbCreateWindow directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:41:47 +02:00
Enrico Weigelt, metux IT consult 023ee2237f xwin: drop wrapping on ScreenRec->PositionWindow()
Instead of complicated wrapping, just call fbPositionWindow directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:41:45 +02:00
Enrico Weigelt, metux IT consult b0460841e8 xwin: drop wrapping on ScreenRec->DestroyWindow()
Instead of complicated wrapping, just call fbDestroyWindow directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:41:42 +02:00
Enrico Weigelt, metux IT consult 66e1b34a88 xfree86: modeset: call miCreateScreenResources() directly
No need for complicated wrapping/unwrapping: it's always just
miCreateResources() anyway - so we can call it directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:41:39 +02:00
Enrico Weigelt, metux IT consult bd8b8481da xfree86: fbdevhw: drop unused FBDEVHW_PLANES
Not used anywhere, neither internal nor external.

(BTW, those defines are only used within xf86-video-fbdev, so they maybe
could be moved over there.)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:41:34 +02:00
Enrico Weigelt, metux IT consult f794511711 xfree86: fbdevhw: drop unused fbdevHWSaveScreenWeak()
Not used anywhere, neither internal nor external (drivers), so no need
to keep it any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:41:31 +02:00
Enrico Weigelt, metux IT consult 95018dca2f xfree86: fbdevhw: drop unused fbdevHWEnterVTWeak()
Not used anywhere, neither internal nor external (drivers), so no need
to keep it any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:41:29 +02:00
Enrico Weigelt, metux IT consult 9bfdcb1ef2 xfree86: fbdevhw: drop unused fbdevHWGetBuildinMode()
Not used anywhere, neither internal nor external (drivers), so no need
to keep it any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:41:24 +02:00
Enrico Weigelt, metux IT consult e9775aad3d xfree86: fbdevhw: drop unused fbdevHWGetFD()
Not used anywhere, neither internal nor external (drivers), so no need
to keep it any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:41:20 +02:00
Enrico Weigelt, metux IT consult 7c60120c02 xfree86: fbdevhw: drop unused fbdevHWFreeRec()
Not used anywhere, neither internal nor external (drivers), so no need
to keep it any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:41:17 +02:00
Enrico Weigelt, metux IT consult e0b143cfd9 xfree86: fbdevhw: make fbdevHWGetRec() static
Not used by any external consumers, only within the same source file,
so can become static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:41:15 +02:00