Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Abstract wm #90

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

[RFC] Abstract wm #90

wants to merge 7 commits into from

Conversation

ykaliuta
Copy link
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
The global option max_reclevel used only for raw X recursive windows
iterating, so make it local for it.

Signed-off-by: Yauheni Kaliuta <[email protected]>
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 <[email protected]>
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 <[email protected]>
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