-
Notifications
You must be signed in to change notification settings - Fork 191
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
Handle resize events [Feature request #196] #197
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not to sure about this as we do some trickery during the setup phase wrt the geometry and the monitor chains.
NET_WM_STATE, | ||
NET_WM_STATE_STICKY, | ||
NET_WM_STATE_ABOVE, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just add a NET_WM_ATOM_MAX
to avoid the sizeof/sizeof
repeated twice.
void | ||
create_pixmap (monitor_t *mon) | ||
{ | ||
if (mon->pixmap) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No brackets on 1-line if
s.
notify_ev = (xcb_configure_notify_event_t *)ev; | ||
|
||
for (monitor_t *mon = monhead; mon; mon = mon->next) { | ||
if (mon->window != notify_ev->window) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the matching window
is processed you can terminate the loop.
update_ewmh_atoms (void) | ||
{ | ||
// Only desktops that support EWMH should continue | ||
if (!atom_list[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a xcb_atom_t
type nullable?
bw = mon->width = notify_ev->width; | ||
bh = notify_ev->height; | ||
|
||
create_pixmap(mon); // Xorg doesn't allow resizing pixmaps, so we create a new one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put the comment above the code so that the lines are not too long.
Indeed, this solution would make more sense if bar geometries were not dinamically set by default. Particularly, it feels a bit hackish as some agreed in #163, maybe a sane approach would be to split the bar in two scripts, keeping only the manual geometry logic set by Anyway, should this PR be closed? I don't feel that it makes sense too, at the current state of the project. |
Any updates on this? |
Implements resize events handling as requested in #196.