tycho-kirchner / fastcompmgr

A fast compositor for X11
Other
58 stars 2 forks source link

:tada: [Newcomer] Instructions & Congrats! #3

Open FelipeFTN opened 2 months ago

FelipeFTN commented 2 months ago

Hi buddy @tycho-kirchner! Really nice project you started here! The benchmark results are impressive, my congrats!! :clap:

A bit of a context :scroll:

So, I'm just moving from Picom, Just found an old laptop and somehow I managed to fixed it! hahaha Searching a bit, it's not that difficult to get to know about your project, and so I decided to use it! Since my laptop is pretty old, I cannot do much thing with it. It's only 2.9 Gbs of RAM and an intel i3 M 350 with 2.2GHz :face_with_spiral_eyes: I'm really having some fun by exploring how limited the hardware is, and ways to overcome this. So, fastcompmgr seems to be the way to go haha I'm using Arch Linux with i3. image

The issue :question:

So, I'm pretty noob with compositors, how they do what they do and how they work. I would be pretty happy to learn more, and perhaps, also contribute with this project! :rocket: In summary, I don't have any idea on how to start with fastcompmgr :thinking: Is there some wiki, docs or config examples I could use? I would be really happy with that! If not, can you give me some instructions on how to start? Which config files to create? If can I use the same config from Picom or something?

That's all! haha Again, I appreciate your work on this project, I'm very excited to test it on my computer. Maybe you should upgrade the name a little bit, it's to long to type and hard to remember haha :sweat_smile:

Thanks!

tycho-kirchner commented 2 months ago

Hi, and thanks for the warm words.

contribute with this project

I'd appreciate that. The next thing on my agenda (but my time is sparse) is to detect and not draw shadows on _GTK_FRAME_EXTENTS windows, because popup-menus in recent versions of google chrome appear to draw a double shadow. Something among the lines of that (untested)

static bool is_gtk_frame_extent_id(Display *dpy, Window w){
  Atom type;
  int format;
  unsigned long nitems, after;
  unsigned char *data = NULL;
  int result;

  result = XGetWindowProperty(
    dpy, w,  XInternAtom(dpy, "_GTK_FRAME_EXTENTS", False)
  0, LONG_MAX, false, XA_CARDINAL, 
    &type, &format, &nitems, &after,
    (unsigned char **)&data);
  if (result == Success && data!=NULL) {
    XFree((void *)data);
    return nitems == 4 ;
  }
  return false;
}

Is there some wiki, docs or config examples I could use?

Well, there is the manpage but it's somewhat outdated, as, for instance fading is broken. Also, fastcompmgr has no config file - just commandline arguments 😉. You imply to be using Arch, so you're familiar with the terminal - just calling fastcompmgr -o 0.4 -r 12 -c -C as written in the README should be enough for most use cases.

Maybe you should upgrade the name a little bit

Well, the name's not nice, but X11 is dying anyway. I guess I'll leave it that way (;

Samueru-sama commented 2 months ago

I'd appreciate that. The next thing on my agenda (but my time is sparse) is to detect and not draw shadows on _GTK_FRAME_EXTENTS windows, because popup-menus in recent versions of google chrome appear to draw a double shadow. Something among the lines of that (untested)

I noticed this issue with brave, the popup windows sometimes have a white background, but the issue is intermittent, it doesn't happen always.

EDIT: Also a crude config file can be added by adding a wrapper script that reads the options stored in config file and passes them to fastcompmgr when it is run. But I'm not sure if there is an actual need for that.

tycho-kirchner commented 2 months ago

I noticed this issue with brave, the popup windows sometimes have a white background, but the issue is intermittent, it doesn't happen always.

Actually, besides not drawing shadows on _GTK_FRAME_EXTENTS windows, I assume that fastcompmgr's win_extents function must also be updated to respect the border sizes of _GTK_FRAME_EXTENTS. It will likely look similar to _wnck_get_frame_extents in libwnck. If anyone wants to take a look, I'm happy to accept a PR. In the next 1.5 months I probably won't have the time to fix that myself.

FelipeFTN commented 2 months ago

@tycho-kirchner Hello again! haha sorry for late reply! :sweat_smile: I actually tried running fastcompmgr -o 0.4 -r 12 -c -C. But nothing changes here... :confused: Any idea? I'm trying to see some opacity change at the windows, but nothing happens. also, no border radius showing too.

Nothing seems to appear when running: journalctl | rg fastcompmgr tho.

tycho-kirchner commented 2 months ago

Sounds strange. When you run that command in the terminal, what is the output? Also, does xcompmgr or compton draw shadows using that parameters -o 0.4 -r 12 -c -C ?

FelipeFTN commented 2 months ago

No changes at all :confused: At start, no logs or stdout generated. fastcompmgr returned some errors when I do screenshot, but when I re-runned, it got back to normal. screenshot-20240614-204540Z-all

screenshot-20240614-204301Z-all

tycho-kirchner commented 2 months ago

Those errors look normal. However, if xcompmgr is not working as well, I suppose maybe something in your i3 config is messed up? I suggest the following: to exclude Xorg or graphics driver weirdness's, install openbox and check if shadows are drawn there correctly. Next, I'd test i'3 default config (for instance with a new testuser to not mess up you settings). If that is working as well, I' go stepwise though your i3 config and check which option causes that behavior.

adetabrani commented 2 months ago

@tycho-kirchner Are there any plans to add blur and rounded corner features?

tycho-kirchner commented 2 months ago

Are there any plans to add blur and rounded corner features?

As long as these features can be implemented without making fastcompmgr slow, I could imagine adding those. However, if you followed the discussion here, first thing to fix is _GTK_FRAME_EXTENTS. Next, I want to make vsync work. After that, let's see (;