Skip to content

[RFC] Abstract wm#90

Open
ykaliuta wants to merge 7 commits intosagb:masterfrom
ykaliuta:abstract-wm
Open

[RFC] Abstract wm#90
ykaliuta wants to merge 7 commits intosagb:masterfrom
ykaliuta:abstract-wm

Conversation

@ykaliuta
Copy link
Copy Markdown
Collaborator

@ykaliuta ykaliuta commented Jul 1, 2019

Hi!

This is rebase of old work. In case if you are interested in something like that.

It is an attempt to make a defined interface between core code and WM specific code.

ykaliuta added 7 commits July 1, 2019 22:08
Move g.option_wm set including the guessing code to win.c to keep wm
related code in one place.

Move also g.option_max_reclevel assignemnt.

Signed-off-by: Yauheni Kaliuta <y.kaliuta@gmail.com>
Customize WM functionality via methods of struct WmOps.

Copy WM specific code from win.c to the corresponding WM
files (ewmh, rp, x) and replace it with methods calls.

Provide inline wrappers for default values for the cases when WM
does not require custom functionality.

Signed-off-by: Yauheni Kaliuta <y.kaliuta@gmail.com>
After introducing WM abstraction, most of the old API is used only
inside of the WMs' modules, so make them static (and move to the
PRIVATE part).

There are still cross dependencies to solve, like ewmh_setFocus()
from x.c.

Signed-off-by: Yauheni Kaliuta <y.kaliuta@gmail.com>
win.c handles exacly common things, where customization is done
under struct WmOps, so the function more suits there.

If there is a need to move X related stuff to a separate module,
then it makes sense to look at that independently of WM_NO and
WM_TWM code and move it to more self-descriptive file.

Signed-off-by: Yauheni Kaliuta <y.kaliuta@gmail.com>
The global option max_reclevel used only for raw X recursive windows
iterating, so make it local for it.

Signed-off-by: Yauheni Kaliuta <y.kaliuta@gmail.com>
After introducing abstract interface, there is no more need to make
branches based on the global_wm option value, so no need in the
option.

The patch requires one more hook to struct WmOps.

Signed-off-by: Yauheni Kaliuta <y.kaliuta@gmail.com>
Actually, the parameters were needed for the first recursion call,
so make it other way round -- wrap the first call of x/twm method
with the initial arguments, but main call without any.

Signed-off-by: Yauheni Kaliuta <y.kaliuta@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant