检测显示器信息
This commit is contained in:
26
src/main.c
26
src/main.c
@@ -1 +1,25 @@
|
||||
int main(int argc, char *argv[]) { return 0; }
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "utils.h"
|
||||
#include "xcb.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (has_other_wm_running()) {
|
||||
die("another window manager is already running");
|
||||
}
|
||||
|
||||
{
|
||||
monitor_rect_t *mr = detect_monitor_rect();
|
||||
uint32_t i = 0;
|
||||
while (mr) {
|
||||
printf("mon[%u]: x: %d, y: %d, w: %u, h: %u\n", i, mr->x, mr->y,
|
||||
mr->width, mr->height);
|
||||
mr = mr->next;
|
||||
free(mr);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user