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

Add set-title events for views #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Uks2
Copy link
Contributor

@Uks2 Uks2 commented Jun 20, 2022

Outputs get events that trigger before and after all their windows get drawn.

Views get events that trigger when a window's title is changed so I can keep my status bar up to date.

@ghost
Copy link

ghost commented Jun 20, 2022

If kiwmi migrates to wlr_scene, the pre/post-render events will have to be replaced (also see #60, pls comment if you can). Would you mind splitting the PR into two, or possibly only keeping the title_change? (Would need a comment from buffet on what’s preferred, yay.)

@Uks2
Copy link
Contributor Author

Uks2 commented Jun 20, 2022

If kiwmi migrates to wlr_scene, the pre/post-render events will have to be replaced (also see #60, pls comment if you can)

I have no idea how the scene graph system works, so I'll keep quite on that one.

Would you mind splitting the PR into two, or possibly only keeping the title_change? (Would need a comment from buffet on what’s preferred, yay.)

Either way is fine by me. I'll wait for word from on high then do what I'm told.

@ghost
Copy link

ghost commented Jun 21, 2022

I have no idea how the scene graph system works, so I'll keep quite on that one.

The main point is, instead of rendering things ourselves, we say where they should be and tell the wlr_scene to render them all for us. Therefore we can’t pop in just before/after something’s gonna render (i’m not exactly sure how it’s for outputs’ post-render), but rather say ‘draw this&this below/above this&this’.

It’s only a change in how things are achieved, and what i’m saying is, we don’t necessarily want to introduce something that would soon be replaced.

@Uks2
Copy link
Contributor Author

Uks2 commented Jun 21, 2022

Okay, that makes sense.

I've just had a quick look though wlr_scene.h and it seems like you're able to create coloured rectangles and add them to you scene graph. We might be able to wrap that up in an output:draw_rect() lua function, with just an extra parameter for whether it goes above or below the windows. How you delete those rectangles is another matter though.

...or we go nuts and create a whole API for drawing on wlr_buffers. :)

I'll try to have a rummage though #50 at some point and look at what the practicalities are.

@ghost ghost mentioned this pull request Jun 22, 2022
@ghost
Copy link

ghost commented Jun 22, 2022

We might be able to wrap that up in an output:draw_rect() lua function, with just an extra parameter for whether it goes above or below the windows. How you delete those rectangles is another matter though.

...or we go nuts and create a whole API for drawing on wlr_buffers. :)

See #60 (comment)

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from this detail and the above comment, looks good to me.

kiwmi/desktop/xdg_shell.c Outdated Show resolved Hide resolved
@Uks2 Uks2 force-pushed the events-branch branch 2 times, most recently from 234715e to 9083380 Compare July 30, 2022 21:04
Works in basically the same way as all the other events (I hope!),
allows the config script to update a status bar or whatever.
@Uks2 Uks2 changed the title Add pre- and post-render events for outputs and title-change events for views Add set-title events for views Jul 30, 2022
@Uks2
Copy link
Contributor Author

Uks2 commented Jul 30, 2022

Changed event name, removed pre- and post-render events and rebased on top of the scene graph changes

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.

None yet

1 participant