git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@671 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-11-12 03:01:17 +00:00
parent 01d37553c8
commit 91b27d5f65
2 changed files with 9 additions and 4 deletions

View File

@@ -169,13 +169,18 @@ print(OUT
. " \$(LIBS)\n");
foreach my $l (@library_targets) {
my $warn = "-Wall -Wextra -Wno-sign-compare";
my $s = $l;
my $o = $object_suffix;
$o =~ s/\./\\\./g;
$s =~ s/$o$/.c/;
if($l =~ /^external\//){
$warn = "";
}
print(OUT "${l}: ${s}\n");
print(OUT " \$(CC) \$(CFLAGS\) \$\(INCDIR) -c -o ${l} ${s}\n");
print(OUT " \$(CC) $warn \$(CFLAGS\) \$\(INCDIR) -c -o ${l} ${s}\n");
}
print(OUT "\n");
print(OUT "\n");

View File

@@ -210,7 +210,8 @@ MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) {
XSelectInput(r->display, r->window, mask);
if(x != MwDEFAULT || y != MwDEFAULT) {
MwLLGetXYWH(r, &px, &py, &width, &height);
unsigned int dummy;
MwLLGetXYWH(r, &px, &py, &dummy, &dummy);
if(x == MwDEFAULT) x = px;
if(y == MwDEFAULT) y = py;
@@ -292,8 +293,7 @@ void MwLLColorUpdate(MwLL handle, MwLLColor c, int r, int g, int b) {
c->blue = b;
}
void MwLLGetXYWH(MwLL handle, int* x, int* y, unsigned int* w, unsigned int* h) {
Window root, parent;
Window child;
Window root;
unsigned int border, depth;
XGetGeometry(handle->display, handle->window, &root, x, y, w, h, &border, &depth);