wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit a798042a6c1f29e880688a8ae2980efb3793d429
parent 4bfb45faa5bc22709244f745a52f8a477f0b88f2
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Mon, 24 Apr 2006 18:23:06 +0200

fixed fullscreen issues in acroread, mplayer (if floating)


Diffstat:
cmd/wm/area.c | 5+++--
cmd/wm/client.c | 6+++++-
cmd/wm/event.c | 17+++++++++++++----
3 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/cmd/wm/area.c b/cmd/wm/area.c @@ -155,8 +155,9 @@ place_client(Area *a, Client *c) XPoint p1 = {0, 0}, p2 = {0, 0}; Frame *f = c->frame.data[c->sel]; - if(c->trans || f->rect.width >= a->rect.width - || f->rect.height >= a->rect.height) + if(c->trans) + return; + if(c->rect.width >= a->rect.width || c->rect.height >= a->rect.height) return; if(!field) { diff --git a/cmd/wm/client.c b/cmd/wm/client.c @@ -28,7 +28,7 @@ update_client_name(Client *c) if(name.value && name.nitems && name.encoding == UTF8_STRING && name.format == 8) { int n; char **list = nil; - if(XmbTextPropertyToTextList(dpy, &name, &list, &n) == Success + if(Xutf8TextPropertyToTextList(dpy, &name, &list, &n) == Success && n > 0 && *list) { cext_strlcpy(c->name, *list, sizeof(c->name)); @@ -459,6 +459,10 @@ resize_client(Client *c, XRectangle *r, Bool ignore_xcall) match_sizehints(c); if(!ignore_xcall) { + if(!idx_of_area(f->area) && c->rect.width >= rect.width && c->rect.height >= rect.height) { + f->rect.x = -def.border; + f->rect.y = -height_of_bar(); + } if(f->area->view == view.data[sel]) XMoveResizeWindow(dpy, c->framewin, f->rect.x, f->rect.y, f->rect.width, f->rect.height); diff --git a/cmd/wm/event.c b/cmd/wm/event.c @@ -105,11 +105,14 @@ handle_configurerequest(XEvent *e) c = client_of_win(ev->window); ev->value_mask &= ~CWSibling; - if(c) { + + if(c->frame.size && idx_of_area(c->frame.data[c->sel]->area)) + return; + gravitate_client(c, True); - if(c->frame.size && (idx_of_area(c->frame.data[c->sel]->area) == 0)) { + if(c->frame.size) { if(ev->value_mask & CWX) c->rect.x = ev->x; if(ev->value_mask & CWY) @@ -126,8 +129,14 @@ handle_configurerequest(XEvent *e) if(c->frame.size) { Frame *f = c->frame.data[c->sel]; - f->rect.x = wc.x = c->rect.x - def.border; - f->rect.y = wc.y = c->rect.y - height_of_bar(); + if(c->rect.width >= rect.width && c->rect.height >= rect.height) { + f->rect.x = wc.x = -def.border; + f->rect.y = wc.y = -height_of_bar(); + } + else { + f->rect.x = wc.x = c->rect.x - def.border; + f->rect.y = wc.y = c->rect.y - height_of_bar(); + } f->rect.width = wc.width = c->rect.width + 2 * def.border; f->rect.height = wc.height = c->rect.height + def.border + height_of_bar();