|
|
@ -6,6 +6,7 @@
|
|
|
|
#include "xrecord.h"
|
|
|
|
#include "xrecord.h"
|
|
|
|
#include "xinerama.h"
|
|
|
|
#include "xinerama.h"
|
|
|
|
#include "win_utils.h"
|
|
|
|
#include "win_utils.h"
|
|
|
|
|
|
|
|
#include "xevents.h"
|
|
|
|
#include "user.h"
|
|
|
|
#include "user.h"
|
|
|
|
#include "scan.h"
|
|
|
|
#include "scan.h"
|
|
|
|
#include "cleanup.h"
|
|
|
|
#include "cleanup.h"
|
|
|
@ -61,6 +62,10 @@ void do_copyregion(sraRegionPtr region, int dx, int dy, int mode);
|
|
|
|
|
|
|
|
|
|
|
|
int check_ncache(int reset, int mode);
|
|
|
|
int check_ncache(int reset, int mode);
|
|
|
|
int find_rect(int idx, int x, int y, int w, int h);
|
|
|
|
int find_rect(int idx, int x, int y, int w, int h);
|
|
|
|
|
|
|
|
int bs_restore(int idx, int *nbatch, sraRegionPtr rmask, XWindowAttributes *attr, int clip, int nopad, int *valid, int verb);
|
|
|
|
|
|
|
|
int try_to_fix_su(Window win, int idx, Window above, int *nbatch, char *mode);
|
|
|
|
|
|
|
|
int try_to_fix_resize_su(Window orig_frame, int orig_x, int orig_y, int orig_w, int orig_h,
|
|
|
|
|
|
|
|
int x, int y, int w, int h, int try_batch);
|
|
|
|
|
|
|
|
|
|
|
|
static void get_client_regions(int *req, int *mod, int *cpy, int *num) ;
|
|
|
|
static void get_client_regions(int *req, int *mod, int *cpy, int *num) ;
|
|
|
|
static void parse_scroll_copyrect_str(char *scr);
|
|
|
|
static void parse_scroll_copyrect_str(char *scr);
|
|
|
@ -1566,7 +1571,7 @@ if (db > 1) fprintf(stderr, "------------ got: %d x: %4d y: %3d"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (fast_push) {
|
|
|
|
if (fast_push) {
|
|
|
|
int k, nbatch = 0;
|
|
|
|
int nbatch = 0;
|
|
|
|
double delay, d1 = 0.1, d2 = 0.02;
|
|
|
|
double delay, d1 = 0.1, d2 = 0.02;
|
|
|
|
rc = try_copyrect(frame, frame, x, y, w, h, dx, dy, &obscured,
|
|
|
|
rc = try_copyrect(frame, frame, x, y, w, h, dx, dy, &obscured,
|
|
|
|
tmpregion, waittime, &nbatch);
|
|
|
|
tmpregion, waittime, &nbatch);
|
|
|
@ -3604,7 +3609,7 @@ void clear_win_events(Window win, int vis) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
XSetErrorHandler(old_handler);
|
|
|
|
XSetErrorHandler(old_handler);
|
|
|
|
fprintf(stderr, " 0x%x\n", (unsigned int) win);
|
|
|
|
fprintf(stderr, " 0x%lx\n", win);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -4200,6 +4205,7 @@ if (no) fprintf(stderr, "--NO, wf_raise: %s\n", no);
|
|
|
|
snapshot_stack_list(0, 0.0);
|
|
|
|
snapshot_stack_list(0, 0.0);
|
|
|
|
snap_old();
|
|
|
|
snap_old();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int set_copyrect_drag(int idx, Window orig_frame, int try_batch) {
|
|
|
|
int set_copyrect_drag(int idx, Window orig_frame, int try_batch) {
|
|
|
@ -5816,7 +5822,7 @@ int lookup_win_index(Window win) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (idx < 0) {
|
|
|
|
if (idx < 0) {
|
|
|
|
fprintf(stderr, "recentC(fail): %d 0x%x\n", idx, (unsigned int) win);
|
|
|
|
fprintf(stderr, "recentC(fail): %d 0x%lx\n", idx, win);
|
|
|
|
s3++;
|
|
|
|
s3++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (s1 + s2 + s3 >= 1000) {
|
|
|
|
if (s1 + s2 + s3 >= 1000) {
|
|
|
@ -5946,7 +5952,7 @@ int lookup_old_stack_index(int ic) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#define STORE(k, w, attr) \
|
|
|
|
#define STORE(k, w, attr) \
|
|
|
|
if (0) fprintf(stderr, "STORE(%d) = 0x%x\n", k, w); \
|
|
|
|
if (0) fprintf(stderr, "STORE(%d) = 0x%lx\n", k, w); \
|
|
|
|
cache_list[k].win = w; \
|
|
|
|
cache_list[k].win = w; \
|
|
|
|
cache_list[k].fetched = 1; \
|
|
|
|
cache_list[k].fetched = 1; \
|
|
|
|
cache_list[k].valid = 1; \
|
|
|
|
cache_list[k].valid = 1; \
|
|
|
@ -5974,7 +5980,7 @@ int lookup_old_stack_index(int ic) {
|
|
|
|
cache_list[k].vis_unobs_time = 0.0;
|
|
|
|
cache_list[k].vis_unobs_time = 0.0;
|
|
|
|
|
|
|
|
|
|
|
|
#define DELETE(k) \
|
|
|
|
#define DELETE(k) \
|
|
|
|
if (0) fprintf(stderr, "DELETE(%d) = 0x%x\n", k, cache_list[k].win); \
|
|
|
|
if (0) fprintf(stderr, "DELETE(%d) = 0x%lx\n", k, cache_list[k].win); \
|
|
|
|
cache_list[k].win = None; \
|
|
|
|
cache_list[k].win = None; \
|
|
|
|
cache_list[k].fetched = 0; \
|
|
|
|
cache_list[k].fetched = 0; \
|
|
|
|
cache_list[k].valid = 0; \
|
|
|
|
cache_list[k].valid = 0; \
|
|
|
@ -6167,8 +6173,8 @@ void expire_rects1(int idx, int w, int h, int *x_hit, int *y_hit, int big1, int
|
|
|
|
int k_w = cache_list[ik].bs_w;
|
|
|
|
int k_w = cache_list[ik].bs_w;
|
|
|
|
int k_h = cache_list[ik].bs_h;
|
|
|
|
int k_h = cache_list[ik].bs_h;
|
|
|
|
|
|
|
|
|
|
|
|
fprintf(stderr, ">>**--**>> found rect via EXPIRE: %d 0x%x -- %dx%d+%d+%d %d %d -- %dx%d+%d+%d A: %d/%d\n",
|
|
|
|
fprintf(stderr, ">>**--**>> found rect via EXPIRE: %d 0x%lx -- %dx%d+%d+%d %d %d -- %dx%d+%d+%d A: %d/%d\n",
|
|
|
|
ik, (unsigned int) cache_list[ik].win, w, h, x, y, *x_hit, *y_hit, k_w, k_h, k_x, k_y, k_w * k_h, w * h);
|
|
|
|
ik, cache_list[ik].win, w, h, x, y, *x_hit, *y_hit, k_w, k_h, k_x, k_y, k_w * k_h, w * h);
|
|
|
|
|
|
|
|
|
|
|
|
free_rect(ik);
|
|
|
|
free_rect(ik);
|
|
|
|
fr_EXPIRE++;
|
|
|
|
fr_EXPIRE++;
|
|
|
@ -6405,7 +6411,6 @@ fprintf(stderr, "Expire[%02d] %9.5f age=%9.4f area=%8d need=%8d\n", nwgt, 1
|
|
|
|
r1 = sraRgnCreateRect(x0, y0, x0+w, y0+h);
|
|
|
|
r1 = sraRgnCreateRect(x0, y0, x0+w, y0+h);
|
|
|
|
|
|
|
|
|
|
|
|
for (i=0; i<cache_list_num; i++) {
|
|
|
|
for (i=0; i<cache_list_num; i++) {
|
|
|
|
double top;
|
|
|
|
|
|
|
|
int xb = cache_list[i].bs_x;
|
|
|
|
int xb = cache_list[i].bs_x;
|
|
|
|
int yb = cache_list[i].bs_y;
|
|
|
|
int yb = cache_list[i].bs_y;
|
|
|
|
int wb = cache_list[i].bs_w;
|
|
|
|
int wb = cache_list[i].bs_w;
|
|
|
@ -6502,8 +6507,8 @@ fprintf(stderr, "j=%2d acc=%.6f r=%.6f\n", j, norm, r);
|
|
|
|
int k_w = cache_list[ik].bs_w;
|
|
|
|
int k_w = cache_list[ik].bs_w;
|
|
|
|
int k_h = cache_list[ik].bs_h;
|
|
|
|
int k_h = cache_list[ik].bs_h;
|
|
|
|
|
|
|
|
|
|
|
|
fprintf(stderr, ">>**--**>> found rect [%d] via RAN EXPIRE: %d 0x%x -- %dx%d+%d+%d %d %d -- %dx%d+%d+%d A: %d/%d\n",
|
|
|
|
fprintf(stderr, ">>**--**>> found rect [%d] via RAN EXPIRE: %d 0x%lx -- %dx%d+%d+%d %d %d -- %dx%d+%d+%d A: %d/%d\n",
|
|
|
|
get_bs_n(*y_hit), ik, (unsigned int) cache_list[ik].win, w, h, x, y, *x_hit, *y_hit, k_w, k_h, k_x, k_y, k_w * k_h, w * h);
|
|
|
|
get_bs_n(*y_hit), ik, cache_list[ik].win, w, h, x, y, *x_hit, *y_hit, k_w, k_h, k_x, k_y, k_w * k_h, w * h);
|
|
|
|
|
|
|
|
|
|
|
|
free_rect(ik);
|
|
|
|
free_rect(ik);
|
|
|
|
fr_EXPIRE++;
|
|
|
|
fr_EXPIRE++;
|
|
|
@ -6980,14 +6985,14 @@ int bs_save(int idx, int *nbatch, XWindowAttributes *attr, int clip, int only_if
|
|
|
|
int x2, y2, w2, h2;
|
|
|
|
int x2, y2, w2, h2;
|
|
|
|
int x, y, w, h;
|
|
|
|
int x, y, w, h;
|
|
|
|
int dx, dy, rc = 1;
|
|
|
|
int dx, dy, rc = 1;
|
|
|
|
sraRegionPtr r, r0, r1;
|
|
|
|
sraRegionPtr r, r0;
|
|
|
|
|
|
|
|
|
|
|
|
x1 = cache_list[idx].x;
|
|
|
|
x1 = cache_list[idx].x;
|
|
|
|
y1 = cache_list[idx].y;
|
|
|
|
y1 = cache_list[idx].y;
|
|
|
|
w1 = cache_list[idx].width;
|
|
|
|
w1 = cache_list[idx].width;
|
|
|
|
h1 = cache_list[idx].height;
|
|
|
|
h1 = cache_list[idx].height;
|
|
|
|
|
|
|
|
|
|
|
|
if (verb) fprintf(stderr, "backingstore save: 0x%x %3d clip=%d\n", (unsigned int) win, idx, clip);
|
|
|
|
if (verb) fprintf(stderr, "backingstore save: 0x%lx %3d clip=%d\n", win, idx, clip);
|
|
|
|
|
|
|
|
|
|
|
|
X_LOCK;
|
|
|
|
X_LOCK;
|
|
|
|
if (*valid) {
|
|
|
|
if (*valid) {
|
|
|
@ -6996,7 +7001,7 @@ if (verb) fprintf(stderr, "backingstore save: 0x%x %3d clip=%d\n", (unsig
|
|
|
|
attr->width = w1;
|
|
|
|
attr->width = w1;
|
|
|
|
attr->height = h1;
|
|
|
|
attr->height = h1;
|
|
|
|
} else if (! valid_wr(idx, win, attr)) {
|
|
|
|
} else if (! valid_wr(idx, win, attr)) {
|
|
|
|
fprintf(stderr, "bs_save: not a valid X window: 0x%x\n", (unsigned int) win);
|
|
|
|
fprintf(stderr, "bs_save: not a valid X window: 0x%lx\n", win);
|
|
|
|
X_UNLOCK;
|
|
|
|
X_UNLOCK;
|
|
|
|
*valid = 0;
|
|
|
|
*valid = 0;
|
|
|
|
cache_list[idx].valid = 0;
|
|
|
|
cache_list[idx].valid = 0;
|
|
|
@ -7081,7 +7086,7 @@ int su_save(int idx, int *nbatch, XWindowAttributes *attr, int clip, int *valid,
|
|
|
|
int dx, dy, rc = 1;
|
|
|
|
int dx, dy, rc = 1;
|
|
|
|
sraRegionPtr r, r0;
|
|
|
|
sraRegionPtr r, r0;
|
|
|
|
|
|
|
|
|
|
|
|
if (verb) fprintf(stderr, "save-unders save: 0x%x %3d \n", (unsigned int) win, idx);
|
|
|
|
if (verb) fprintf(stderr, "save-unders save: 0x%lx %3d \n", win, idx);
|
|
|
|
|
|
|
|
|
|
|
|
x1 = cache_list[idx].x;
|
|
|
|
x1 = cache_list[idx].x;
|
|
|
|
y1 = cache_list[idx].y;
|
|
|
|
y1 = cache_list[idx].y;
|
|
|
@ -7095,7 +7100,7 @@ if (verb) fprintf(stderr, "save-unders save: 0x%x %3d \n", (unsigned int
|
|
|
|
attr->width = w1;
|
|
|
|
attr->width = w1;
|
|
|
|
attr->height = h1;
|
|
|
|
attr->height = h1;
|
|
|
|
} else if (! valid_wr(idx, win, attr)) {
|
|
|
|
} else if (! valid_wr(idx, win, attr)) {
|
|
|
|
fprintf(stderr, "su_save: not a valid X window: 0x%x\n", (unsigned int) win);
|
|
|
|
fprintf(stderr, "su_save: not a valid X window: 0x%lx\n", win);
|
|
|
|
X_UNLOCK;
|
|
|
|
X_UNLOCK;
|
|
|
|
*valid = 0;
|
|
|
|
*valid = 0;
|
|
|
|
cache_list[idx].valid = 0;
|
|
|
|
cache_list[idx].valid = 0;
|
|
|
@ -7175,7 +7180,7 @@ int bs_restore(int idx, int *nbatch, sraRegionPtr rmask, XWindowAttributes *attr
|
|
|
|
int dx, dy;
|
|
|
|
int dx, dy;
|
|
|
|
sraRegionPtr r, r0;
|
|
|
|
sraRegionPtr r, r0;
|
|
|
|
|
|
|
|
|
|
|
|
if (verb) fprintf(stderr, "backingstore restore: 0x%x %3d \n", (unsigned int) win, idx);
|
|
|
|
if (verb) fprintf(stderr, "backingstore restore: 0x%lx %3d \n", win, idx);
|
|
|
|
|
|
|
|
|
|
|
|
x1 = cache_list[idx].x;
|
|
|
|
x1 = cache_list[idx].x;
|
|
|
|
y1 = cache_list[idx].y;
|
|
|
|
y1 = cache_list[idx].y;
|
|
|
@ -7189,7 +7194,7 @@ if (verb) fprintf(stderr, "backingstore restore: 0x%x %3d \n", (unsigned int
|
|
|
|
attr->width = w1;
|
|
|
|
attr->width = w1;
|
|
|
|
attr->height = h1;
|
|
|
|
attr->height = h1;
|
|
|
|
} else if (! valid_wr(idx, win, attr)) {
|
|
|
|
} else if (! valid_wr(idx, win, attr)) {
|
|
|
|
fprintf(stderr, "BS_restore: not a valid X window: 0x%x\n", (unsigned int) win);
|
|
|
|
fprintf(stderr, "BS_restore: not a valid X window: 0x%lx\n", win);
|
|
|
|
*valid = 0;
|
|
|
|
*valid = 0;
|
|
|
|
X_UNLOCK;
|
|
|
|
X_UNLOCK;
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
@ -7273,12 +7278,12 @@ if (verb) fprintf(stderr, "BS_rest: %.4f %.2f %d done. %dx%d+%d+%d %dx%d+%d+%d
|
|
|
|
int su_restore(int idx, int *nbatch, sraRegionPtr rmask, XWindowAttributes *attr, int clip, int nopad, int *valid, int verb) {
|
|
|
|
int su_restore(int idx, int *nbatch, sraRegionPtr rmask, XWindowAttributes *attr, int clip, int nopad, int *valid, int verb) {
|
|
|
|
Window win = cache_list[idx].win;
|
|
|
|
Window win = cache_list[idx].win;
|
|
|
|
int x1, y1, w1, h1;
|
|
|
|
int x1, y1, w1, h1;
|
|
|
|
int x2, y2, w2, h2;
|
|
|
|
int x2 = 0, y2 = 0, w2 = 0, h2 = 0;
|
|
|
|
int x, y, w, h;
|
|
|
|
int x, y, w, h;
|
|
|
|
int dx, dy;
|
|
|
|
int dx, dy;
|
|
|
|
sraRegionPtr r, r0;
|
|
|
|
sraRegionPtr r, r0;
|
|
|
|
|
|
|
|
|
|
|
|
if (verb) fprintf(stderr, "save-unders restore: 0x%x %3d \n", (unsigned int) win, idx);
|
|
|
|
if (verb) fprintf(stderr, "save-unders restore: 0x%lx %3d \n", win, idx);
|
|
|
|
|
|
|
|
|
|
|
|
x1 = cache_list[idx].x;
|
|
|
|
x1 = cache_list[idx].x;
|
|
|
|
y1 = cache_list[idx].y;
|
|
|
|
y1 = cache_list[idx].y;
|
|
|
@ -7291,8 +7296,12 @@ if (verb) fprintf(stderr, "save-unders restore: 0x%x %3d \n", (unsigned int
|
|
|
|
attr->y = y1;
|
|
|
|
attr->y = y1;
|
|
|
|
attr->width = w1;
|
|
|
|
attr->width = w1;
|
|
|
|
attr->height = h1;
|
|
|
|
attr->height = h1;
|
|
|
|
|
|
|
|
x2 = attr->x;
|
|
|
|
|
|
|
|
y2 = attr->y;
|
|
|
|
|
|
|
|
w2 = attr->width;
|
|
|
|
|
|
|
|
h2 = attr->height;
|
|
|
|
} else if (! valid_wr(idx, win, attr)) {
|
|
|
|
} else if (! valid_wr(idx, win, attr)) {
|
|
|
|
fprintf(stderr, "SU_restore: not a valid X window: 0x%x\n", (unsigned int) win);
|
|
|
|
fprintf(stderr, "SU_restore: not a valid X window: 0x%lx\n", win);
|
|
|
|
*valid = 0;
|
|
|
|
*valid = 0;
|
|
|
|
x2 = x1;
|
|
|
|
x2 = x1;
|
|
|
|
y2 = y1;
|
|
|
|
y2 = y1;
|
|
|
@ -7451,7 +7460,7 @@ void block_stats(void) {
|
|
|
|
if (! rc && ! macosx_console) {
|
|
|
|
if (! rc && ! macosx_console) {
|
|
|
|
char *u = getenv("USER");
|
|
|
|
char *u = getenv("USER");
|
|
|
|
if (u && !strcmp(u, "runge")) fprintf(stderr, "\a");
|
|
|
|
if (u && !strcmp(u, "runge")) fprintf(stderr, "\a");
|
|
|
|
fprintf(stderr, "\n *** UNRECLAIMED WINDOW: 0x%x %dx%d+%d+%d\n\n", (unsigned int) win, w, h, x, y);
|
|
|
|
fprintf(stderr, "\n *** UNRECLAIMED WINDOW: 0x%lx %dx%d+%d+%d\n\n", win, w, h, x, y);
|
|
|
|
DELETE(k);
|
|
|
|
DELETE(k);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (t < 3 || (t % 4) == 0 || hack_val || macosx_console) {
|
|
|
|
if (t < 3 || (t % 4) == 0 || hack_val || macosx_console) {
|
|
|
@ -7459,8 +7468,8 @@ void block_stats(void) {
|
|
|
|
double t2 = cache_list[k].bs_time;
|
|
|
|
double t2 = cache_list[k].bs_time;
|
|
|
|
if (t1 > 0.0) {t1 = dnow() - t1;} else {t1 = -1.0;}
|
|
|
|
if (t1 > 0.0) {t1 = dnow() - t1;} else {t1 = -1.0;}
|
|
|
|
if (t2 > 0.0) {t2 = dnow() - t2;} else {t2 = -1.0;}
|
|
|
|
if (t2 > 0.0) {t2 = dnow() - t2;} else {t2 = -1.0;}
|
|
|
|
fprintf(stderr, " [%02d] %04d 0x%08x bs: %04dx%04d+%04d+%05d vw: %04dx%04d+%04d+%04d cl: %04dx%04d+%04d+%04d map=%d su=%9.3f bs=%9.3f cnt=%d/%d\n",
|
|
|
|
fprintf(stderr, " [%02d] %04d 0x%08lx bs: %04dx%04d+%04d+%05d vw: %04dx%04d+%04d+%04d cl: %04dx%04d+%04d+%04d map=%d su=%9.3f bs=%9.3f cnt=%d/%d\n",
|
|
|
|
n, k, (unsigned int) win, w, h, x, y, attr.width, attr.height, attr.x, attr.y,
|
|
|
|
n, k, win, w, h, x, y, attr.width, attr.height, attr.x, attr.y,
|
|
|
|
cache_list[k].width, cache_list[k].height, cache_list[k].x, cache_list[k].y,
|
|
|
|
cache_list[k].width, cache_list[k].height, cache_list[k].x, cache_list[k].y,
|
|
|
|
attr.map_state == IsViewable, t1, t2, cache_list[k].create_cnt, cache_list[k].map_cnt);
|
|
|
|
attr.map_state == IsViewable, t1, t2, cache_list[k].create_cnt, cache_list[k].map_cnt);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -7553,7 +7562,7 @@ void xselectinput(Window w, unsigned long evmask, int sync) {
|
|
|
|
if (trapped_xioerror) {
|
|
|
|
if (trapped_xioerror) {
|
|
|
|
fprintf(stderr, "XSELECTINPUT: trapped XIO Error.");
|
|
|
|
fprintf(stderr, "XSELECTINPUT: trapped XIO Error.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sync) fprintf(stderr, "XSELECTINPUT: 0x%x sync=%d err=%d/%d\n", (unsigned int) w, sync, trapped_xerror, trapped_xioerror);
|
|
|
|
if (sync) fprintf(stderr, "XSELECTINPUT: 0x%lx sync=%d err=%d/%d\n", w, sync, trapped_xerror, trapped_xioerror);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Bool xcheckmaskevent(Display *d, long mask, XEvent *ev) {
|
|
|
|
Bool xcheckmaskevent(Display *d, long mask, XEvent *ev) {
|
|
|
@ -7606,9 +7615,7 @@ int try_to_fix_resize_su(Window orig_frame, int orig_x, int orig_y, int orig_w,
|
|
|
|
int idx = lookup_win_index(orig_frame);
|
|
|
|
int idx = lookup_win_index(orig_frame);
|
|
|
|
sraRegionPtr r0, r1, r2, r3;
|
|
|
|
sraRegionPtr r0, r1, r2, r3;
|
|
|
|
int sx1, sy1, sw1, sh1, dx, dy;
|
|
|
|
int sx1, sy1, sw1, sh1, dx, dy;
|
|
|
|
int sx2, sy2, sw2, sh2;
|
|
|
|
|
|
|
|
int bx1, by1, bw1, bh1;
|
|
|
|
int bx1, by1, bw1, bh1;
|
|
|
|
int bx2, by2, bw2, bh2;
|
|
|
|
|
|
|
|
int nr = 0, *nbat = NULL;
|
|
|
|
int nr = 0, *nbat = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
if (idx < 0) {
|
|
|
|
if (idx < 0) {
|
|
|
@ -7729,11 +7736,13 @@ fprintf(stderr, "Growing resize %d %dx%d+%d+%d -> %dx%d+%d+%d\n", idx, orig_w,
|
|
|
|
sraRgnDestroy(r0);
|
|
|
|
sraRgnDestroy(r0);
|
|
|
|
sraRgnDestroy(r1);
|
|
|
|
sraRgnDestroy(r1);
|
|
|
|
sraRgnDestroy(r2);
|
|
|
|
sraRgnDestroy(r2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int try_to_fix_su(Window win, int idx, Window above, int *nbatch, char *mode) {
|
|
|
|
int try_to_fix_su(Window win, int idx, Window above, int *nbatch, char *mode) {
|
|
|
|
int i, idx2, n = 0, found = 0, found_above = 0;
|
|
|
|
int i, idx2, n = 0, found = 0, found_above = 0;
|
|
|
|
sraRegionPtr r0, r1, r2, r3;
|
|
|
|
sraRegionPtr r0, r1, r2;
|
|
|
|
Window win2;
|
|
|
|
Window win2;
|
|
|
|
int x, y, w, h, on = 0;
|
|
|
|
int x, y, w, h, on = 0;
|
|
|
|
int x0, y0, w0, h0;
|
|
|
|
int x0, y0, w0, h0;
|
|
|
@ -7751,7 +7760,7 @@ int try_to_fix_su(Window win, int idx, Window above, int *nbatch, char *mode) {
|
|
|
|
if (idx < 0) {
|
|
|
|
if (idx < 0) {
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fprintf(stderr, "TRY_TO_FIX_SU(%d) 0x%x 0x%x was_unmapped=%d map_state=%s\n", idx, win, above, unmapped, MState(cache_list[idx].map_state));
|
|
|
|
fprintf(stderr, "TRY_TO_FIX_SU(%d) 0x%lx 0x%lx was_unmapped=%d map_state=%s\n", idx, win, above, unmapped, MState(cache_list[idx].map_state));
|
|
|
|
|
|
|
|
|
|
|
|
if (cache_list[idx].map_state != IsViewable && !unmapped) {
|
|
|
|
if (cache_list[idx].map_state != IsViewable && !unmapped) {
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
@ -7788,12 +7797,12 @@ fprintf(stderr, "TRY_TO_FIX_SU(%d) 0x%x 0x%x was_unmapped=%d map_state=%s\n",
|
|
|
|
for (i = old_stack_n - 1; i >= 0; i--) {
|
|
|
|
for (i = old_stack_n - 1; i >= 0; i--) {
|
|
|
|
win2 = old_stack[i];
|
|
|
|
win2 = old_stack[i];
|
|
|
|
if (win2 == above) {
|
|
|
|
if (win2 == above) {
|
|
|
|
fprintf(stderr, "0x%x turn on: 0x%x i=%d\n", win, win2, i);
|
|
|
|
fprintf(stderr, "0x%lx turn on: 0x%lx i=%d\n", win, win2, i);
|
|
|
|
on = 1;
|
|
|
|
on = 1;
|
|
|
|
found_above = 1;
|
|
|
|
found_above = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (win2 == win) {
|
|
|
|
if (win2 == win) {
|
|
|
|
fprintf(stderr, "0x%x turn off: 0x%x i=%d\n", win, win2, i);
|
|
|
|
fprintf(stderr, "0x%lx turn off: 0x%lx i=%d\n", win, win2, i);
|
|
|
|
found = 1;
|
|
|
|
found = 1;
|
|
|
|
on = 0;
|
|
|
|
on = 0;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -7959,7 +7968,7 @@ sraRegionPtr idx_create_rgn(sraRegionPtr r0, int idx) {
|
|
|
|
|
|
|
|
|
|
|
|
void set_ncache_xrootpmap(void) {
|
|
|
|
void set_ncache_xrootpmap(void) {
|
|
|
|
Atom pmap, type;
|
|
|
|
Atom pmap, type;
|
|
|
|
int done = 0, format;
|
|
|
|
int format;
|
|
|
|
unsigned long length, after;
|
|
|
|
unsigned long length, after;
|
|
|
|
XImage *image = NULL;
|
|
|
|
XImage *image = NULL;
|
|
|
|
|
|
|
|
|
|
|
@ -7972,7 +7981,6 @@ void set_ncache_xrootpmap(void) {
|
|
|
|
pmap = XInternAtom(dpy, "_XROOTPMAP_ID", True);
|
|
|
|
pmap = XInternAtom(dpy, "_XROOTPMAP_ID", True);
|
|
|
|
if (pmap != None) {
|
|
|
|
if (pmap != None) {
|
|
|
|
Pixmap pixmap;
|
|
|
|
Pixmap pixmap;
|
|
|
|
char *data;
|
|
|
|
|
|
|
|
unsigned char *d_pmap;
|
|
|
|
unsigned char *d_pmap;
|
|
|
|
|
|
|
|
|
|
|
|
XGetWindowProperty(dpy, rootwin, pmap, 0L, 1L, False,
|
|
|
|
XGetWindowProperty(dpy, rootwin, pmap, 0L, 1L, False,
|
|
|
@ -7990,7 +7998,7 @@ void set_ncache_xrootpmap(void) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (image != NULL) {
|
|
|
|
if (image != NULL) {
|
|
|
|
char *src, *dst;
|
|
|
|
char *src, *dst;
|
|
|
|
unsigned int line;
|
|
|
|
int line;
|
|
|
|
int pixelsize = bpp/8;
|
|
|
|
int pixelsize = bpp/8;
|
|
|
|
int y1 = dpy_y * (ncache+1);
|
|
|
|
int y1 = dpy_y * (ncache+1);
|
|
|
|
|
|
|
|
|
|
|
@ -8044,6 +8052,7 @@ int ev_store(Window win, int type) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_ev_list[_ev_list_cnt] = win;
|
|
|
|
_ev_list[_ev_list_cnt] = win;
|
|
|
|
_ev_case[_ev_list_cnt++] = type;
|
|
|
|
_ev_case[_ev_list_cnt++] = type;
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int ev_lookup(Window win, int type) {
|
|
|
|
int ev_lookup(Window win, int type) {
|
|
|
@ -8065,8 +8074,12 @@ void read_events(int *n_in) {
|
|
|
|
XEvent ev;
|
|
|
|
XEvent ev;
|
|
|
|
|
|
|
|
|
|
|
|
while (xcheckmaskevent(dpy, all_ev, &Ev[n])) {
|
|
|
|
while (xcheckmaskevent(dpy, all_ev, &Ev[n])) {
|
|
|
|
|
|
|
|
int cfg_size = 0;
|
|
|
|
|
|
|
|
int cfg_pos = 0;
|
|
|
|
|
|
|
|
int cfg_stack = 0;
|
|
|
|
int type = Ev[n].type;
|
|
|
|
int type = Ev[n].type;
|
|
|
|
Window w = None;
|
|
|
|
Window w = None;
|
|
|
|
|
|
|
|
|
|
|
|
win = Ev[n].xany.window;
|
|
|
|
win = Ev[n].xany.window;
|
|
|
|
Ev_done[n] = 0;
|
|
|
|
Ev_done[n] = 0;
|
|
|
|
Ev_area[n] = 0;
|
|
|
|
Ev_area[n] = 0;
|
|
|
@ -8074,9 +8087,6 @@ void read_events(int *n_in) {
|
|
|
|
Ev_map[n] = None;
|
|
|
|
Ev_map[n] = None;
|
|
|
|
Ev_unmap[n] = None;
|
|
|
|
Ev_unmap[n] = None;
|
|
|
|
Ev_order[n] = n;
|
|
|
|
Ev_order[n] = n;
|
|
|
|
int cfg_size = 0;
|
|
|
|
|
|
|
|
int cfg_pos = 0;
|
|
|
|
|
|
|
|
int cfg_stack = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ev = Ev[n];
|
|
|
|
ev = Ev[n];
|
|
|
|
|
|
|
|
|
|
|
@ -8125,7 +8135,7 @@ void read_events(int *n_in) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fprintf(stderr, "----- %02d inputev 0x%08x w: 0x%08x %04dx%04d+%04d+%04d %s %s\n", n, win, w, wd, ht, x, y, Etype(type), msg);
|
|
|
|
fprintf(stderr, "----- %02d inputev 0x%08lx w: 0x%08lx %04dx%04d+%04d+%04d %s %s\n", n, win, w, wd, ht, x, y, Etype(type), msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (win == rootwin) {
|
|
|
|
if (win == rootwin) {
|
|
|
@ -8161,7 +8171,7 @@ if (type == UnmapNotify) w = Ev[n].xunmap.window;
|
|
|
|
if (type == MapNotify) w = Ev[n].xmap.window;
|
|
|
|
if (type == MapNotify) w = Ev[n].xmap.window;
|
|
|
|
if (type == Expose) w = Ev[n].xexpose.window;
|
|
|
|
if (type == Expose) w = Ev[n].xexpose.window;
|
|
|
|
if (type == ConfigureNotify) w = Ev[n].xconfigure.window;
|
|
|
|
if (type == ConfigureNotify) w = Ev[n].xconfigure.window;
|
|
|
|
if (type != ConfigureNotify) fprintf(stderr, "root: skip %s for 0x%x\n", Etype(type), (unsigned int) w);
|
|
|
|
if (type != ConfigureNotify) fprintf(stderr, "root: skip %s for 0x%lx\n", Etype(type), w);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -8220,10 +8230,9 @@ fprintf(stderr, "----- skip %s\n", Etype(type));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int try_to_synthesize_su(int force, int *nbatch) {
|
|
|
|
int try_to_synthesize_su(int force, int *nbatch) {
|
|
|
|
int i, j, idx, idx2, n = 0;
|
|
|
|
int i, idx, idx2, n = 0;
|
|
|
|
sraRegionPtr r0, r1, r2, r3;
|
|
|
|
sraRegionPtr r0, r1, r2;
|
|
|
|
Window win, win2;
|
|
|
|
Window win = None;
|
|
|
|
int x, y, w, h, on = 0;
|
|
|
|
|
|
|
|
int x0, y0, w0, h0;
|
|
|
|
int x0, y0, w0, h0;
|
|
|
|
int x1, y1, w1, h1;
|
|
|
|
int x1, y1, w1, h1;
|
|
|
|
int x2, y2, w2, h2;
|
|
|
|
int x2, y2, w2, h2;
|
|
|
@ -8247,7 +8256,7 @@ int try_to_synthesize_su(int force, int *nbatch) {
|
|
|
|
if (attr.map_state != IsViewable) {
|
|
|
|
if (attr.map_state != IsViewable) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//fprintf(stderr, "win: 0x%x %d idx=%d\n", win, i, idx);
|
|
|
|
//fprintf(stderr, "win: 0x%lx %d idx=%d\n", win, i, idx);
|
|
|
|
|
|
|
|
|
|
|
|
x2 = attr.x;
|
|
|
|
x2 = attr.x;
|
|
|
|
y2 = attr.y;
|
|
|
|
y2 = attr.y;
|
|
|
@ -8269,7 +8278,7 @@ int try_to_synthesize_su(int force, int *nbatch) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
int i2, ok = 1, cnt = 0;
|
|
|
|
int i2, cnt = 0;
|
|
|
|
idx = tmp_stack[i];
|
|
|
|
idx = tmp_stack[i];
|
|
|
|
if (idx < 0 || cache_list[idx].bs_x < 0) {
|
|
|
|
if (idx < 0 || cache_list[idx].bs_x < 0) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
@ -8280,14 +8289,13 @@ int try_to_synthesize_su(int force, int *nbatch) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (cache_list[idx].su_time > 0.0) {
|
|
|
|
if (cache_list[idx].su_time > 0.0) {
|
|
|
|
if (force) {
|
|
|
|
if (force) {
|
|
|
|
fprintf(stderr, "forcing synth: 0x%x %d\n", cache_list[idx].win, idx);
|
|
|
|
fprintf(stderr, "forcing synth: 0x%lx %d\n", cache_list[idx].win, idx);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (ncache_xrootpmap) {
|
|
|
|
if (ncache_xrootpmap) {
|
|
|
|
int dx, dy;
|
|
|
|
int dx, dy;
|
|
|
|
int dx2, dy2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
x0 = cache_list[idx].x;
|
|
|
|
x0 = cache_list[idx].x;
|
|
|
|
y0 = cache_list[idx].y;
|
|
|
|
y0 = cache_list[idx].y;
|
|
|
@ -8364,7 +8372,7 @@ fprintf(stderr, "forcing synth: 0x%x %d\n", cache_list[idx].win, idx);
|
|
|
|
if (cnt) {
|
|
|
|
if (cnt) {
|
|
|
|
cache_list[idx].su_time = dnow();
|
|
|
|
cache_list[idx].su_time = dnow();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fprintf(stderr, " try_to_synth_su: 0x%x %d idx=%d cnt=%d\n", win, i, idx, cnt);
|
|
|
|
fprintf(stderr, " try_to_synth_su: 0x%lx %d idx=%d cnt=%d\n", win, i, idx, cnt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
r1 = NULL;
|
|
|
|
r1 = NULL;
|
|
|
@ -8412,7 +8420,7 @@ fprintf(stderr, "DELETE(%d) %dx%d+%d+%d\n", k, cache_list[k].width, cache_list[k
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (cache_list[k].create_cnt && cache_list[k].map_state != IsViewable && cache_list[k].map_cnt == 0) {
|
|
|
|
if (cache_list[k].create_cnt && cache_list[k].map_state != IsViewable && cache_list[k].map_cnt == 0) {
|
|
|
|
if (cache_list[k].bs_x >= 0) {
|
|
|
|
if (cache_list[k].bs_x >= 0) {
|
|
|
|
fprintf(stderr, "Created window never mapped: freeing(%d) 0x%x\n", k, (unsigned int) win);
|
|
|
|
fprintf(stderr, "Created window never mapped: freeing(%d) 0x%lx\n", k, win);
|
|
|
|
free_rect(k);
|
|
|
|
free_rect(k);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -8472,7 +8480,7 @@ fprintf(stderr, "Created window never mapped: freeing(%d) 0x%x\n", k, (unsigned
|
|
|
|
} else if (aw * ah < 64 * 64) {
|
|
|
|
} else if (aw * ah < 64 * 64) {
|
|
|
|
;
|
|
|
|
;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
fprintf(stderr, "*SNAP BS_save: 0x%x %d %d %d\n", (unsigned int) win, aw, ah, cache_list[idx].map_state);
|
|
|
|
fprintf(stderr, "*SNAP BS_save: 0x%lx %d %d %d\n", win, aw, ah, cache_list[idx].map_state);
|
|
|
|
valid = 0;
|
|
|
|
valid = 0;
|
|
|
|
bs_save(idx, bat, &attr, 1, 0, &valid, 0);
|
|
|
|
bs_save(idx, bat, &attr, 1, 0, &valid, 0);
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
@ -8482,7 +8490,7 @@ fprintf(stderr, "*SNAP BS_save: 0x%x %d %d %d\n", (unsigned int) win, aw, ah, ca
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
fprintf(stderr, "*SCHED LOOKUP FAIL: i=%d 0x%x\n", i, win);
|
|
|
|
fprintf(stderr, "*SCHED LOOKUP FAIL: i=%d 0x%lx\n", i, win);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sched_bs[i] = None;
|
|
|
|
sched_bs[i] = None;
|
|
|
@ -8569,7 +8577,7 @@ if (vis_now_n) fprintf(stderr, "*VIS snapshot all %.4f\n", dnowx());
|
|
|
|
i = vis_now[k];
|
|
|
|
i = vis_now[k];
|
|
|
|
win = cache_list[i].win;
|
|
|
|
win = cache_list[i].win;
|
|
|
|
valid = 0;
|
|
|
|
valid = 0;
|
|
|
|
fprintf(stderr, "*VIS BS_save: 0x%x %d %d %d\n", win, cache_list[i].width, cache_list[i].height, cache_list[i].map_state);
|
|
|
|
fprintf(stderr, "*VIS BS_save: 0x%lx %d %d %d\n", win, cache_list[i].width, cache_list[i].height, cache_list[i].map_state);
|
|
|
|
if (now < cache_list[i].vis_unobs_time + 0.75 && now < cache_list[i].vis_obs_time + 0.75) {
|
|
|
|
if (now < cache_list[i].vis_unobs_time + 0.75 && now < cache_list[i].vis_obs_time + 0.75) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -8821,7 +8829,7 @@ if (hack_val == 2) {
|
|
|
|
win2 = ev.xcreatewindow.window;
|
|
|
|
win2 = ev.xcreatewindow.window;
|
|
|
|
if (ev_lookup(win2, EV_REPARENT) || ev_lookup(win2, EV_DESTROY)) {
|
|
|
|
if (ev_lookup(win2, EV_REPARENT) || ev_lookup(win2, EV_DESTROY)) {
|
|
|
|
if (skipwins_n < skipwins_max) {
|
|
|
|
if (skipwins_n < skipwins_max) {
|
|
|
|
fprintf(stderr, "SKIPWINS: CreateNotify: 0x%x %d\n", win2, n1);
|
|
|
|
fprintf(stderr, "SKIPWINS: CreateNotify: 0x%lx %d\n", win2, n1);
|
|
|
|
skipwins[skipwins_n++] = win2;
|
|
|
|
skipwins[skipwins_n++] = win2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -8833,13 +8841,13 @@ fprintf(stderr, "SKIPWINS: CreateNotify: 0x%x %d\n", win2, n1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
CLEAR(idx);
|
|
|
|
CLEAR(idx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fprintf(stderr, "PRELOOP: CreateNotify: 0x%x %d valid_window\n", win2, n1);
|
|
|
|
fprintf(stderr, "PRELOOP: CreateNotify: 0x%lx %d valid_window\n", win2, n1);
|
|
|
|
if (valid_window(win2, &attr, 1)) {
|
|
|
|
if (valid_window(win2, &attr, 1)) {
|
|
|
|
STORE(idx, win2, attr);
|
|
|
|
STORE(idx, win2, attr);
|
|
|
|
CLEAR(idx);
|
|
|
|
CLEAR(idx);
|
|
|
|
cache_list[idx].selectinput = 1;
|
|
|
|
cache_list[idx].selectinput = 1;
|
|
|
|
cache_list[idx].create_cnt = 1;
|
|
|
|
cache_list[idx].create_cnt = 1;
|
|
|
|
fprintf(stderr, "PRELOOP: CreateNotify: 0x%x %d xselectinput\n", win2, n1);
|
|
|
|
fprintf(stderr, "PRELOOP: CreateNotify: 0x%lx %d xselectinput\n", win2, n1);
|
|
|
|
xselectinput(win2, win_ev, 1);
|
|
|
|
xselectinput(win2, win_ev, 1);
|
|
|
|
nxsel++;
|
|
|
|
nxsel++;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -8852,7 +8860,7 @@ fprintf(stderr, "PRELOOP: CreateNotify: 0x%x %d xselectinput\n", win2, n1);
|
|
|
|
win2 = ev.xreparent.window;
|
|
|
|
win2 = ev.xreparent.window;
|
|
|
|
if (win2 != rootwin) {
|
|
|
|
if (win2 != rootwin) {
|
|
|
|
idx = lookup_win_index(win2);
|
|
|
|
idx = lookup_win_index(win2);
|
|
|
|
fprintf(stderr, "PRELOOP: RepartNotify: 0x%x %d idx=%d\n", win2, n1, idx);
|
|
|
|
fprintf(stderr, "PRELOOP: RepartNotify: 0x%lx %d idx=%d\n", win2, n1, idx);
|
|
|
|
if (idx >= 0) {
|
|
|
|
if (idx >= 0) {
|
|
|
|
DELETE(idx);
|
|
|
|
DELETE(idx);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -8914,7 +8922,7 @@ fprintf(stderr, "\n"); rfbLog("IN check_ncache() %d events. %.4f\n", n, now -
|
|
|
|
for (n2 = 0; n2 < n; n2++) {
|
|
|
|
for (n2 = 0; n2 < n; n2++) {
|
|
|
|
if (Ev_unmap[n2] == twin) {
|
|
|
|
if (Ev_unmap[n2] == twin) {
|
|
|
|
if (skipwins_n < skipwins_max) {
|
|
|
|
if (skipwins_n < skipwins_max) {
|
|
|
|
fprintf(stderr, "SKIPWINS: Ev_unmap/map: 0x%x %d\n", twin, n2);
|
|
|
|
fprintf(stderr, "SKIPWINS: Ev_unmap/map: 0x%lx %d\n", twin, n2);
|
|
|
|
skipwins[skipwins_n++] = twin;
|
|
|
|
skipwins[skipwins_n++] = twin;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -9045,7 +9053,7 @@ fprintf(stderr, "SKIPWINS: Ev_unmap/map: 0x%x %d\n", twin, n2);
|
|
|
|
su_fix_cnt = 0;
|
|
|
|
su_fix_cnt = 0;
|
|
|
|
|
|
|
|
|
|
|
|
for (k = 0; k < skipwins_n; k++) {
|
|
|
|
for (k = 0; k < skipwins_n; k++) {
|
|
|
|
fprintf(stderr, "skipwins[%d] 0x%x\n", k, skipwins[k]);
|
|
|
|
fprintf(stderr, "skipwins[%d] 0x%lx\n", k, skipwins[k]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
X_LOCK;
|
|
|
|
X_LOCK;
|
|
|
@ -9076,7 +9084,7 @@ for (k = 0; k < skipwins_n; k++) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (skip) {
|
|
|
|
if (skip) {
|
|
|
|
fprintf(stderr, "skip%02d: ** SpecialSkip 0x%x/0x%x type: %s\n", ik, (unsigned int) win, (unsigned int) win2, Etype(type));
|
|
|
|
fprintf(stderr, "skip%02d: ** SpecialSkip 0x%lx/0x%lx type: %s\n", ik, win, win2, Etype(type));
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -9107,16 +9115,16 @@ fprintf(stderr, "skip%02d: ** SpecialSkip 0x%x/0x%x type: %s\n", ik, (unsigned
|
|
|
|
create_cnt++;
|
|
|
|
create_cnt++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fprintf(stderr, "root%02d: ** CreateNotify 0x%x %3d -- %dx%d+%d+%d valid=%d\n", ik, (unsigned int) win2, idx, w, h, x, y, valid);
|
|
|
|
fprintf(stderr, "root%02d: ** CreateNotify 0x%lx %3d -- %dx%d+%d+%d valid=%d\n", ik, win2, idx, w, h, x, y, valid);
|
|
|
|
|
|
|
|
|
|
|
|
} else if (type == ReparentNotify) {
|
|
|
|
} else if (type == ReparentNotify) {
|
|
|
|
if (ev.xreparent.parent != rootwin) {
|
|
|
|
if (ev.xreparent.parent != rootwin) {
|
|
|
|
win2 = ev.xreparent.window;
|
|
|
|
win2 = ev.xreparent.window;
|
|
|
|
idx = lookup_win_index(win2);
|
|
|
|
idx = lookup_win_index(win2);
|
|
|
|
fprintf(stderr, "root%02d: ReparentNotifyRM 0x%x %3d\n", ik, (unsigned int) win2, idx);
|
|
|
|
fprintf(stderr, "root%02d: ReparentNotifyRM 0x%lx %3d\n", ik, win2, idx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
fprintf(stderr, "root%02d: ** IgnoringRoot 0x%x type: %s\n", ik, (unsigned int) win, Etype(type));
|
|
|
|
fprintf(stderr, "root%02d: ** IgnoringRoot 0x%lx type: %s\n", ik, win, Etype(type));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (type == ConfigureNotify) {
|
|
|
|
if (type == ConfigureNotify) {
|
|
|
@ -9131,8 +9139,8 @@ fprintf(stderr, "root%02d: ** IgnoringRoot 0x%x type: %s\n", ik, (unsigned int)
|
|
|
|
oabove = cache_list[idx].above;
|
|
|
|
oabove = cache_list[idx].above;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fprintf(stderr, "----%02d: ConfigureNotify 0x%x %3d -- above: 0x%x -> 0x%x %dx%d+%d+%d\n", ik, (unsigned int) win, idx,
|
|
|
|
fprintf(stderr, "----%02d: ConfigureNotify 0x%lx %3d -- above: 0x%lx -> 0x%lx %dx%d+%d+%d\n", ik, win, idx,
|
|
|
|
(unsigned int) oabove, (unsigned int) ev.xconfigure.above, ev.xconfigure.width, ev.xconfigure.height, ev.xconfigure.x, ev.xconfigure.y);
|
|
|
|
oabove, ev.xconfigure.above, ev.xconfigure.width, ev.xconfigure.height, ev.xconfigure.x, ev.xconfigure.y);
|
|
|
|
|
|
|
|
|
|
|
|
if (idx < 0) {
|
|
|
|
if (idx < 0) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
@ -9151,12 +9159,12 @@ fprintf(stderr, "----%02d: ConfigureNotify 0x%x %3d -- above: 0x%x -> 0x%x %
|
|
|
|
if (x_old != x_new || y_old != y_new) {
|
|
|
|
if (x_old != x_new || y_old != y_new) {
|
|
|
|
/* invalidate su */
|
|
|
|
/* invalidate su */
|
|
|
|
cache_list[idx].su_time = 0.0;
|
|
|
|
cache_list[idx].su_time = 0.0;
|
|
|
|
fprintf(stderr, " INVALIDATE su: 0x%x xy: +%d+%d +%d+%d \n", (unsigned int) win, x_old, y_old, x_new, y_new);
|
|
|
|
fprintf(stderr, " INVALIDATE su: 0x%lx xy: +%d+%d +%d+%d \n", win, x_old, y_old, x_new, y_new);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (w_old != w_new || h_old != h_new) {
|
|
|
|
if (w_old != w_new || h_old != h_new) {
|
|
|
|
/* invalidate bs */
|
|
|
|
/* invalidate bs */
|
|
|
|
cache_list[idx].bs_time = 0.0;
|
|
|
|
cache_list[idx].bs_time = 0.0;
|
|
|
|
fprintf(stderr, " INVALIDATE bs: 0x%x wh: %dx%d %dx%d \n", (unsigned int) win, w_old, h_old, w_new, h_new);
|
|
|
|
fprintf(stderr, " INVALIDATE bs: 0x%lx wh: %dx%d %dx%d \n", win, w_old, h_old, w_new, h_new);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
stack_change = 0;
|
|
|
|
stack_change = 0;
|
|
|
@ -9177,7 +9185,7 @@ fprintf(stderr, " INVALIDATE bs: 0x%x wh: %dx%d %dx%d \n", (unsigned
|
|
|
|
if (n_MN == 0 && n_UN == 0) {
|
|
|
|
if (n_MN == 0 && n_UN == 0) {
|
|
|
|
if (su_fix_cnt > 0) {
|
|
|
|
if (su_fix_cnt > 0) {
|
|
|
|
ok = 0;
|
|
|
|
ok = 0;
|
|
|
|
fprintf(stderr, " CONF_IGNORE: Too many stacking changes: 0x%x\n", (unsigned int) win);
|
|
|
|
fprintf(stderr, " CONF_IGNORE: Too many stacking changes: 0x%lx\n", win);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -9205,7 +9213,7 @@ fprintf(stderr, " CONF_IGNORE: Too many stacking changes: 0x%x\n", (uns
|
|
|
|
} else if (type == VisibilityNotify) {
|
|
|
|
} else if (type == VisibilityNotify) {
|
|
|
|
int state = ev.xvisibility.state;
|
|
|
|
int state = ev.xvisibility.state;
|
|
|
|
idx = lookup_win_index(win);
|
|
|
|
idx = lookup_win_index(win);
|
|
|
|
fprintf(stderr, "----%02d: VisibilityNotify 0x%x %3d state: %s U/P %d/%d\n", ik, (unsigned int) win, idx, VState(state), n_VN_u, n_VN_p);
|
|
|
|
fprintf(stderr, "----%02d: VisibilityNotify 0x%lx %3d state: %s U/P %d/%d\n", ik, win, idx, VState(state), n_VN_u, n_VN_p);
|
|
|
|
|
|
|
|
|
|
|
|
if (idx < 0) {
|
|
|
|
if (idx < 0) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
@ -9215,7 +9223,7 @@ fprintf(stderr, "----%02d: VisibilityNotify 0x%x %3d state: %s U/P %d/%d\n", i
|
|
|
|
} else if (macosx_console && n_VN_p == 0) {
|
|
|
|
} else if (macosx_console && n_VN_p == 0) {
|
|
|
|
; /* XXXX not working well yet with UnmapNotify ... */
|
|
|
|
; /* XXXX not working well yet with UnmapNotify ... */
|
|
|
|
} else if (state == VisibilityUnobscured) {
|
|
|
|
} else if (state == VisibilityUnobscured) {
|
|
|
|
int i2, ok = 1;
|
|
|
|
int ok = 1;
|
|
|
|
if (ncache <= 2) {
|
|
|
|
if (ncache <= 2) {
|
|
|
|
ok = 0;
|
|
|
|
ok = 0;
|
|
|
|
} else if (ev_lookup(win, EV_MAP)) {
|
|
|
|
} else if (ev_lookup(win, EV_MAP)) {
|
|
|
@ -9277,7 +9285,7 @@ fprintf(stderr, "----%02d: VisibilityNotify 0x%x %3d state: %s U/P %d/%d\n", i
|
|
|
|
|
|
|
|
|
|
|
|
} else if (type == MapNotify) {
|
|
|
|
} else if (type == MapNotify) {
|
|
|
|
idx = lookup_win_index(win);
|
|
|
|
idx = lookup_win_index(win);
|
|
|
|
fprintf(stderr, "----%02d: MapNotify 0x%x %3d\n", ik, (unsigned int) win, idx);
|
|
|
|
fprintf(stderr, "----%02d: MapNotify 0x%lx %3d\n", ik, win, idx);
|
|
|
|
|
|
|
|
|
|
|
|
if (idx < 0) {
|
|
|
|
if (idx < 0) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
@ -9370,7 +9378,7 @@ fprintf(stderr, "----%02d: MapNotify 0x%x %3d\n", ik, (unsigned int) win
|
|
|
|
} else if (type == UnmapNotify) {
|
|
|
|
} else if (type == UnmapNotify) {
|
|
|
|
int x2, y2, w2, h2;
|
|
|
|
int x2, y2, w2, h2;
|
|
|
|
idx = lookup_win_index(win);
|
|
|
|
idx = lookup_win_index(win);
|
|
|
|
fprintf(stderr, "----%02d: UnmapNotify 0x%x %3d\n", ik, (unsigned int) win, idx);
|
|
|
|
fprintf(stderr, "----%02d: UnmapNotify 0x%lx %3d\n", ik, win, idx);
|
|
|
|
|
|
|
|
|
|
|
|
if (idx < 0) {
|
|
|
|
if (idx < 0) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
@ -9452,20 +9460,20 @@ fprintf(stderr, "----%02d: UnmapNotify 0x%x %3d\n", ik, (unsigned int) win
|
|
|
|
win2 = ev.xreparent.window;
|
|
|
|
win2 = ev.xreparent.window;
|
|
|
|
if (win2 != rootwin) {
|
|
|
|
if (win2 != rootwin) {
|
|
|
|
idx = lookup_win_index(win2);
|
|
|
|
idx = lookup_win_index(win2);
|
|
|
|
fprintf(stderr, "----%02d: ReparentNotifyRM 0x%x %3d\n", ik, (unsigned int) win2, idx);
|
|
|
|
fprintf(stderr, "----%02d: ReparentNotifyRM 0x%lx %3d\n", ik, win2, idx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} else if (type == DestroyNotify) {
|
|
|
|
} else if (type == DestroyNotify) {
|
|
|
|
win2 = ev.xdestroywindow.window;
|
|
|
|
win2 = ev.xdestroywindow.window;
|
|
|
|
idx = lookup_win_index(win2);
|
|
|
|
idx = lookup_win_index(win2);
|
|
|
|
fprintf(stderr, "----%02d: DestroyNotify 0x%x %3d\n", ik, (unsigned int) win2, idx);
|
|
|
|
fprintf(stderr, "----%02d: DestroyNotify 0x%lx %3d\n", ik, win2, idx);
|
|
|
|
|
|
|
|
|
|
|
|
if (idx >= 0) {
|
|
|
|
if (idx >= 0) {
|
|
|
|
DELETE(idx);
|
|
|
|
DELETE(idx);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
fprintf(stderr, "igno%02d: ** Ignoring 0x%x type: %s\n", ik, (unsigned int) win, Etype(type));
|
|
|
|
fprintf(stderr, "igno%02d: ** Ignoring 0x%lx type: %s\n", ik, win, Etype(type));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|