🚚 Merges src and include
This commit is contained in:
parent
ac58e5e6db
commit
b8b13ebe07
18 changed files with 22 additions and 27 deletions
|
@ -9,7 +9,6 @@ find_package(X11 REQUIRED)
|
|||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fsanitize=address")
|
||||
|
||||
add_executable(aswm
|
||||
src/aswm/main.c
|
||||
src/aswm/aswm.c
|
||||
src/aswm/mapper/mapper.c
|
||||
src/aswm/event_handlers/create.c
|
||||
|
@ -17,5 +16,5 @@ add_executable(aswm
|
|||
src/aswm/event_handlers/reparent.c
|
||||
src/aswm/event_handlers/destroy.c
|
||||
src/aswm/event_handlers/map.c)
|
||||
target_include_directories(aswm PUBLIC ${X11_INCLUDE_DIR} include)
|
||||
target_include_directories(aswm PUBLIC ${X11_INCLUDE_DIR} src)
|
||||
target_link_libraries(aswm ${X11_LIBRARIES})
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include <stdlib.h>
|
||||
#include "aswm/aswm.h"
|
||||
#include "aswm/event_handlers/create.h"
|
||||
#include "aswm/event_handlers/configure.h"
|
||||
#include "aswm/event_handlers/map.h"
|
||||
#include "aswm/event_handlers/reparent.h"
|
||||
#include "aswm/event_handlers/destroy.h"
|
||||
#include "aswm.h"
|
||||
#include "event_handlers/create.h"
|
||||
#include "event_handlers/configure.h"
|
||||
#include "event_handlers/map.h"
|
||||
#include "event_handlers/reparent.h"
|
||||
#include "event_handlers/destroy.h"
|
||||
|
||||
Aswm _aswm;
|
||||
|
||||
|
@ -53,3 +53,9 @@ void aswm_close() {
|
|||
aswm_free_tile(_aswm.root_tile);
|
||||
XCloseDisplay(_aswm.display);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
aswm_open();
|
||||
aswm_event_loop();
|
||||
aswm_close();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef ASWM
|
||||
#define ASWM
|
||||
|
||||
#include "aswm/mapper/mapper.h"
|
||||
#include "mapper/mapper.h"
|
||||
|
||||
typedef struct {
|
||||
Display *display;
|
||||
|
@ -13,4 +13,6 @@ void aswm_open();
|
|||
void aswm_event_loop();
|
||||
void aswm_close();
|
||||
|
||||
int main(int argc, char** argv);
|
||||
|
||||
#endif
|
|
@ -1,4 +1,4 @@
|
|||
#include "aswm/event_handlers/configure.h"
|
||||
#include "configure.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void OnConfigureRequest(const XConfigureRequestEvent* e) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "aswm/event_handlers/create.h"
|
||||
#include "create.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void OnCreateNotify(const XCreateWindowEvent* e) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "aswm/event_handlers/destroy.h"
|
||||
#include "destroy.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void OnDestroyNotify(const XDestroyWindowEvent* e) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "aswm/event_handlers/map.h"
|
||||
#include "map.h"
|
||||
#include <stdio.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "aswm/event_handlers/reparent.h"
|
||||
#include "reparent.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void OnReparentNotify(const XReparentEvent* e) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "aswm/event_handlers/unmap.h"
|
||||
#include "unmap.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void OnUnmapRequest(Window root, const XMapRequestEvent* e) {
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#include "aswm/aswm.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
aswm_open();
|
||||
aswm_event_loop();
|
||||
aswm_close();
|
||||
}
|
|
@ -53,11 +53,6 @@ AswmTile* aswm_map_new_window(Display* display, Window window, AswmTile* tile) {
|
|||
changes.width = tile->width;
|
||||
changes.height = tile->height;
|
||||
|
||||
printf("\tx = %i\n", changes.x);
|
||||
printf("\ty = %i\n", changes.y);
|
||||
printf("\tw = %i\n", changes.width);
|
||||
printf("\th = %i\n", changes.height);
|
||||
|
||||
XConfigureWindow(display, window, CWX | CWY | CWWidth | CWHeight, &changes);
|
||||
return tile;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue