Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.