Hi Roman,
for your info.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, 31 de May de 2020 10:52, Roman Dobosz <
gry...@gmail.com> wrote:
> On Sun, 31 May 2020 07:50:59 +0100
> "Carlos R. Mafra"
crm...@gmail.com wrote:
>
> Nice list! Perhaps it's worth to fill the issue on GH for every each
> of them.
>
> > I agree that we have issues.
> >
> > 1. the restart I can live with, but I wrote the code in the first
> > place and although it works for me I am not proud of it.
> > The fix will not be minimal and that's the motivation for
> > Rodolfo's fork I believe.
> >
>
> I've already briefly read the code from couple of other window
> managers, how they handle events with appearing/disappearing
> monitors, although didn't deep dive into it yet.
windowmaker was created from the scratch, using X11.
windowmaker do not uses objects, structs or something to create the elements and then draw them on the screen. wmaker just call X11 functions to create these elements.
It include dockapps, windows, menus,...
In Qt, Gtk,... elements are created as objects/structs. Then you can call a function to draw them on the screen. Are different steps. So you can create a menu, draw in the screen, select the element, destroy the menu in the X11, destroy the menu object. There is an abstraction between the element and the screen (X11, win32, wayland,...)
In wmaker, some elements are created when wmaker starts. For example, root menu, window menu:
https://github.com/window-maker/wmaker/blob/master/src/startup.c#L582
The menu is created in X11 (yes, text, lines, background,...), and then hidden. That is nice for many things. For example, with a new window, you can add it to the (hidden) menu. When the user make click on the background wmaker just unhide the menu. For example, the window-list-menu is the same in the root-menu and the window-list-menu itself (it is just moved, both are already created)
But, this behavior adds communication between wmaker and X11 when the user open a new window, close the window, move the window between workspaces,... And the menu must be re-painted (yes, re-painted, but it is probably hidden). Sometimes, create the elements, when are not used, is not good. For example to restore and hide the root menu, it is painted at x = -10000 y = -10000:
https://github.com/window-maker/wmaker/blob/master/src/screen.c#L873
void wScreenRestoreState(WScreen * scr)
{
WMPropList *state;
char *path;
OpenRootMenu(scr, -10000, -10000, False);
wMenuUnmap(scr->root_menu);
What's happens when the user adds a new monitor? Yes, elements are in the screen and the only way in wmaker is restart it.
In awmaker I am trying to solve these things. For example, menus are created only when the user call the menu. When a new window is created, the callback for a new menu entry is called, but if the menu is not created, the callback just do nothing. Less CPU, less X11 communication. With this idea, in the future, when the user adds a new screen, wmaker can remove the menu, and then draw it again (without restart).
awmaker is not fully stable (I don't have crashes, but some things are not fine painted). IMHO awmaker is faster, it has less interaction with X11 (less calls). awmaker is not the window manager for users, now. In the future, when things will be fine, the idea is merge the code with wmaker. I am including all wmaker patches in awmaker, so we have the same functionality. Perhaps some things of awmaker could be translated to wmaker.
Making changes is not easy. I am trying to hold fully compatibility with wmaker and I need add some intermediate states. But many things are better. For example, I don't need brother's menu in awmaker:
https://github.com/window-maker/wmaker/blob/master/src/menu.h#L53
https://github.com/awmaker/awmaker/blob/master/src/menu.h#L52
Currently, I am working with the icons position (coords).
One of the problems are the positions. wmaker uses a fixed positions of the elements, related to the x=0, y=0. If the new monitor has different resolution, then the icons are in the middle of the screen, or outside of the screen. And is not possible to move them inside the screen.
My idea about that is create relative positions with up-right, up-left, down-right and down-left. When the element is painted, the position is not fixed, it is calculated (and saved) for the new device/devices.
>
> > 4. It would be nice to have a user file from which wmgenmenu reads the list
> > of programs, not a list hard-coded into the program itself.
> >
>
> IMHO, that should be done dynamically. Although I don't care about
> generated menu for application, I do see the need for the users.
>
> Using ability of dynamic menus, I'd created a proof of concept[1],
> which generate such menu. Maybe it's worth to think of creating it
> with dedicated type of menu item to be put in main menu. Script is
> simple - it looks into .dektop entries located
> in /usr/share/applications, and grab name, executable and first
> category. Than it make the submenu for every category and put the
> item in it.
>
> If one would like to check that PoC[1], all it needed to be done is
> to download script, make it executable, optionally change the path
> where *desktop files lies (line 9, default
> is /usr/share/applications), create new entry in WPrefs' menu as
> "Generated Submenu" and put the path to the script.
>
> [1]
https://gist.github.com/gryf/fa460d5e728d22cdf87c72fd9183bbc1
IMHO all should be dynamic and self-contained in wmaker. Menus should be created dynamically, but also configuration files. wmaker.inst should be "included" inside the wmaker code.
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> -^- _ something is grinding the emptiness:
>
>
> _ /O)\// Front Line Assembly - Terminal Power
> ((|__(() grf. State of Mind
> -------------------------------------------------------------------------
>
> You received this message because you are subscribed to the Google Groups "Window Maker Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
wmaker-dev+...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/wmaker-dev/20200531105207.781ccf8e1b33eb722610784d%40gmail.com.