mirror of
https://github.com/0intro/wmii
synced 2024-12-22 19:36:51 +03:00
increased warning level, cleaned blitz_strtorect
This commit is contained in:
parent
ab5eb008a8
commit
fb790fbac5
@ -557,7 +557,7 @@ static void handle_after_write_frame(IXPServer * s, File * f)
|
||||
char *size = frames[i]->files[F_SIZE]->content;
|
||||
if (size && strrchr(size, ',')) {
|
||||
XRectangle frect;
|
||||
blitz_strtorect(dpy, &rect, &frect, size);
|
||||
blitz_strtorect(&rect, &frect, size);
|
||||
resize_frame(frames[i], &frect, 0, 0);
|
||||
draw_page(frames[i]->area->page);
|
||||
}
|
||||
|
@ -1,52 +0,0 @@
|
||||
/*
|
||||
* (C)opyright MMIV-MMV Anselm R. Garbe <garbeam at gmail dot com>
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "wm.h"
|
||||
#include "layout.h"
|
||||
|
||||
#include <cext.h>
|
||||
|
||||
static void init_dummy(Area * a);
|
||||
static void deinit_dummy(Area * a);
|
||||
static void arrange_dummy(Area * a);
|
||||
static void attach_dummy(Area * a, Client * c);
|
||||
static void detach_dummy(Area * a, Client * c, int unmapped, int destroyed);
|
||||
static void resize_dummy(Frame * f, XRectangle * new, XPoint * pt);
|
||||
|
||||
static Layout ldummy = { "dummy", init_dummy, deinit_dummy, arrange_dummy, attach_dummy, detach_dummy, resize_dummy };
|
||||
|
||||
void init_layout_dummy()
|
||||
{
|
||||
layouts = (Layout **) attach_item_end((void **) layouts, &ldummy, sizeof(Layout *));
|
||||
}
|
||||
|
||||
|
||||
static void arrange_dummy(Area * a)
|
||||
{
|
||||
}
|
||||
|
||||
static void init_dummy(Area * a)
|
||||
{
|
||||
}
|
||||
|
||||
static void deinit_dummy(Area * a)
|
||||
{
|
||||
}
|
||||
|
||||
static void attach_dummy(Area * a, Client * c)
|
||||
{
|
||||
}
|
||||
|
||||
static void detach_dummy(Area * a, Client * c, int unmapped, int destroyed)
|
||||
{
|
||||
}
|
||||
|
||||
static void resize_dummy(Frame * f, XRectangle * new, XPoint * pt)
|
||||
{
|
||||
}
|
@ -361,7 +361,7 @@ static void check_event(Connection * e)
|
||||
|
||||
static void update_geometry(char *size)
|
||||
{
|
||||
blitz_strtorect(dpy, &rect, &brect, size);
|
||||
blitz_strtorect(&rect, &brect, size);
|
||||
if (!brect.width)
|
||||
brect.width = DisplayWidth(dpy, screen_num);
|
||||
if (!brect.height)
|
||||
|
@ -375,7 +375,7 @@ static void handle_after_write(IXPServer * s, File * f)
|
||||
} else if (files[K_SIZE] == f) {
|
||||
char *size = files[K_SIZE]->content;
|
||||
if (size && strrchr(size, ','))
|
||||
blitz_strtorect(dpy, &rect, &krect, size);
|
||||
blitz_strtorect(&rect, &krect, size);
|
||||
} else if (f == files[K_GRAB_KB]) {
|
||||
grabkb = _strtonum(files[K_GRAB_KB]->content, 0, 1);
|
||||
if (!grabkb) {
|
||||
@ -443,7 +443,7 @@ static void run(char *size)
|
||||
rect.height = DisplayHeight(dpy, screen_num);
|
||||
krect.x = krect.y = -1;
|
||||
krect.width = krect.height = 0;
|
||||
blitz_strtorect(dpy, &rect, &krect, size);
|
||||
blitz_strtorect(&rect, &krect, size);
|
||||
/* default is center position */
|
||||
if (!krect.width) {
|
||||
krect.width = 200;
|
||||
|
@ -564,7 +564,7 @@ static void handle_after_write(IXPServer * s, File * f)
|
||||
} else if (files[M_SIZE] == f) {
|
||||
char *size = files[M_SIZE]->content;
|
||||
if (size && strrchr(size, ',')) {
|
||||
blitz_strtorect(dpy, &rect, &mrect, size);
|
||||
blitz_strtorect(&rect, &mrect, size);
|
||||
XFreePixmap(dpy, pmap);
|
||||
XMoveResizeWindow(dpy, win, mrect.x, mrect.y,
|
||||
mrect.width, mrect.height);
|
||||
@ -644,7 +644,7 @@ static void run(char *size)
|
||||
rect.x = rect.y = 0;
|
||||
rect.width = DisplayWidth(dpy, screen_num);
|
||||
rect.height = DisplayHeight(dpy, screen_num);
|
||||
blitz_strtorect(dpy, &rect, &mrect, size);
|
||||
blitz_strtorect(&rect, &mrect, size);
|
||||
if (!mrect.width)
|
||||
mrect.width = DisplayWidth(dpy, screen_num);
|
||||
if (!mrect.height)
|
||||
|
@ -17,7 +17,7 @@ LIBS = -L${LIBDIR} -L/usr/lib -lc -lm -L${X11LIB} -lX11
|
||||
VERSION = 3-current
|
||||
|
||||
# flags
|
||||
CFLAGS = -O0 -g -Wall ${INCLUDES} -DVERSION=\"${VERSION}\"
|
||||
CFLAGS = -O0 -g -Wall -W ${INCLUDES} -DVERSION=\"${VERSION}\"
|
||||
LDFLAGS = -g ${LIBS}
|
||||
|
||||
# compiler
|
||||
|
@ -41,9 +41,7 @@ void blitz_drawmeter(Display * dpy, Draw * r);
|
||||
void blitz_drawlabelnoborder(Display * dpy, Draw * r);
|
||||
|
||||
/* geometry.c */
|
||||
int
|
||||
blitz_strtorect(Display * dpy, XRectangle * root, XRectangle * r,
|
||||
char *val);
|
||||
int blitz_strtorect(XRectangle * root, XRectangle * r, char *val);
|
||||
int blitz_ispointinrect(int x, int y, XRectangle * r);
|
||||
int blitz_distance(XRectangle * origin, XRectangle * target);
|
||||
void
|
||||
|
@ -46,9 +46,7 @@ static int strtoalign(Align * result, char *val)
|
||||
* Each component can be of following format:
|
||||
* <...> = [+|-]0..n|<alignment>[[+|-]0..n]
|
||||
*/
|
||||
int
|
||||
blitz_strtorect(Display * dpy, XRectangle * root, XRectangle * r,
|
||||
char *val)
|
||||
int blitz_strtorect(XRectangle * root, XRectangle * r, char *val)
|
||||
{
|
||||
char buf[64];
|
||||
char *x, *y, *w, *h;
|
||||
|
Loading…
Reference in New Issue
Block a user