Este sitio web funciona mejor con JavaScript.
Inicio
Explorar
Ayuda
Iniciar sesión
Immanuel
/
sxiv
Seguir
1
Destacar
0
Fork
0
Código
Incidencias
0
Pull Requests
0
Lanzamientos
0
Wiki
Actividad
Explorar el Código
React to ConfigureNotify
master
Bert
hace 14 años
padre
15603c25cf
commit
47d107edb5
Se han
modificado 3 ficheros
con
24 adiciones
y
2 borrados
Dividir vista
Opciones de diferencias
Mostrar estadísticas
Descargar archivo de parche
Descargar archivo de diferencias
+4
-0
events.c
+16
-0
window.c
+4
-2
window.h
+ 4
- 0
events.c
Ver fichero
@@ -30,6 +30,10 @@ void on_expose(app_t *app, XEvent *ev) {
}
void on_configurenotify(app_t *app, XEvent *ev) {
if (app == NULL || ev == NULL)
return;
win_configure(&app->win, &ev->xconfigure);
}
void on_keypress(app_t *app, XEvent *ev) {
+ 16
- 0
window.c
Ver fichero
@@ -84,3 +84,19 @@ void win_close(win_t *win) {
XFreeGC(dpy, gc);
XCloseDisplay(dpy);
}
int win_configure(win_t *win, XConfigureEvent *cev) {
int changed;
if (win == NULL)
return 0;
changed = win->x != cev->x || win->y != cev->y ||
win->w != cev->width || win->h != cev->height;
win->x = cev->x;
win->y = cev->y;
win->w = cev->width;
win->h = cev->height;
win->bw = cev->border_width;
return changed;
}
+ 4
- 2
window.h
Ver fichero
@@ -33,7 +33,9 @@ typedef struct win_s {
int fullscreen;
} win_t;
void win_open(win_t *win);
void win_close(win_t *win);
void win_open(win_t*);
void win_close(win_t*);
int win_configure(win_t*, XConfigureEvent*);
#endif /* WINDOW_H */
Escribir
Vista previa
Cargando…
Cancelar
Guardar