Cleanup some things
* Remove old login background [unused] * Remove glock (graphical lock) [outdated] * Have toolchain/activate set pkg-config variables XXX: You will have unset PKG_CONFIG_LIBDIR to configure native software if you have activated the toolchain! Otherwise, your pkgconfig information will be incorrect. * Fixed a bug in the compositor where we would give window stack order 0 to applications that didn't ask for it because depths were assigned by wid which starts at 0. Make it start at 1 instead, no chance of an app getting the wrong stack order (this shoudn't have any effect on how things work with a login app, since it grabs wid 0; but if you boot directly into a non-login environment, minor timing issues can do odd things.)
This commit is contained in:
parent
127b24a686
commit
352badfadf
1
build.sh
1
build.sh
@ -10,6 +10,7 @@ elif [ -f /etc/fedora-release ]; then
|
|||||||
echo "For best results, follow the steps in the script manually."
|
echo "For best results, follow the steps in the script manually."
|
||||||
fi
|
fi
|
||||||
# Build the toolchain:
|
# Build the toolchain:
|
||||||
|
unset PKG_CONFIG_LIBDIR
|
||||||
pushd toolchain
|
pushd toolchain
|
||||||
./prepare.sh
|
./prepare.sh
|
||||||
./install.sh
|
./install.sh
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.7 MiB |
@ -4,3 +4,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
. $DIR/config.sh
|
. $DIR/config.sh
|
||||||
|
|
||||||
export PATH="$DIR/local/bin:$PATH"
|
export PATH="$DIR/local/bin:$PATH"
|
||||||
|
export PKG_CONFIG_LIBDIR="$PREFIX/$TARGET/lib/pkgconfig"
|
||||||
|
@ -427,7 +427,7 @@ void redraw_bounding_box_r(window_t *window, int32_t width, int32_t height, uint
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wid_t volatile _next_wid = 0;
|
wid_t volatile _next_wid = 1;
|
||||||
|
|
||||||
void send_window_event (process_windows_t * pw, uint8_t event, w_window_t * packet) {
|
void send_window_event (process_windows_t * pw, uint8_t event, w_window_t * packet) {
|
||||||
/* Construct the header */
|
/* Construct the header */
|
||||||
|
@ -1,104 +0,0 @@
|
|||||||
/*
|
|
||||||
* glock
|
|
||||||
*
|
|
||||||
* Graphical lock screen.
|
|
||||||
*/
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
#include <ft2build.h>
|
|
||||||
#include FT_FREETYPE_H
|
|
||||||
#include FT_CACHE_H
|
|
||||||
|
|
||||||
#include "lib/window.h"
|
|
||||||
#include "lib/graphics.h"
|
|
||||||
|
|
||||||
sprite_t * sprites[128];
|
|
||||||
sprite_t alpha_tmp;
|
|
||||||
|
|
||||||
uint16_t win_width;
|
|
||||||
uint16_t win_height;
|
|
||||||
|
|
||||||
gfx_context_t * ctx;
|
|
||||||
|
|
||||||
int center_x(int x) {
|
|
||||||
return (win_width - x) / 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
int center_y(int y) {
|
|
||||||
return (win_height - y) / 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
void init_sprite(int i, char * filename, char * alpha) {
|
|
||||||
sprites[i] = malloc(sizeof(sprite_t));
|
|
||||||
load_sprite(sprites[i], filename);
|
|
||||||
if (alpha) {
|
|
||||||
sprites[i]->alpha = 1;
|
|
||||||
load_sprite(&alpha_tmp, alpha);
|
|
||||||
sprites[i]->masks = alpha_tmp.bitmap;
|
|
||||||
} else {
|
|
||||||
sprites[i]->alpha = 0;
|
|
||||||
}
|
|
||||||
sprites[i]->blank = 0x0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int main (int argc, char ** argv) {
|
|
||||||
setup_windowing();
|
|
||||||
|
|
||||||
int width = wins_globals->server_width;
|
|
||||||
int height = wins_globals->server_height;
|
|
||||||
|
|
||||||
win_width = width;
|
|
||||||
win_height = height;
|
|
||||||
|
|
||||||
|
|
||||||
/* Do something with a window */
|
|
||||||
#define PANEL_HEIGHT 24
|
|
||||||
window_t * wina = window_create(0, PANEL_HEIGHT, width, height - PANEL_HEIGHT);
|
|
||||||
assert(wina);
|
|
||||||
window_reorder (wina, 0xFFFF);
|
|
||||||
ctx = init_graphics_window_double_buffer(wina);
|
|
||||||
|
|
||||||
draw_fill(ctx, rgb(0,0,0));
|
|
||||||
flip(ctx);
|
|
||||||
|
|
||||||
#if 1
|
|
||||||
printf("Loading background...\n");
|
|
||||||
init_sprite(0, "/usr/share/login-background.bmp", NULL);
|
|
||||||
printf("Background loaded.\n");
|
|
||||||
draw_sprite_scaled(ctx, sprites[0], 0, 0, width, height);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 1
|
|
||||||
init_sprite(1, "/usr/share/bs.bmp", "/usr/share/bs-alpha.bmp");
|
|
||||||
draw_sprite_scaled(ctx, sprites[1], center_x(sprites[1]->width), center_y(sprites[1]->height), sprites[1]->width, sprites[1]->height);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
flip(ctx);
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
char ch = 0;
|
|
||||||
w_keyboard_t * kbd;
|
|
||||||
do {
|
|
||||||
kbd = poll_keyboard();
|
|
||||||
if (kbd != NULL) {
|
|
||||||
ch = kbd->key;
|
|
||||||
free(kbd);
|
|
||||||
}
|
|
||||||
} while (kbd != NULL);
|
|
||||||
if (ch == 'q') {
|
|
||||||
goto done;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
syscall_yield();
|
|
||||||
//syscall_wait(wins_globals->server_pid);
|
|
||||||
}
|
|
||||||
done:
|
|
||||||
|
|
||||||
#if 1
|
|
||||||
teardown_windowing();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user