From 77c2a2a3d1fa1098613affbc0d95bfed70bfdd7f Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sat, 6 Feb 2016 10:26:49 +0900 Subject: [PATCH] e bg: remove debug printf --- src/bin/e_client.c | 31 +++++++++++++++++++++++++++++++ src/bin/e_comp_object.c | 24 ++++++++++++++++++++++++ src/bin/e_comp_x.c | 30 +++++++++++++++++++++++++++++- src/bin/e_hints.c | 5 ++++- src/bin/e_remember.c | 20 ++++++++++++++++++++ 5 files changed, 108 insertions(+), 2 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index c0678b93e..d469fb33f 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -1767,6 +1767,10 @@ _e_client_eval(E_Client *ec) if (E_CONTAINS(x, y, ec->w, ec->h, zx, zy, zw, zh)) { ec->x = x, ec->y = y; + ERR("XXXXXX2 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); } else { @@ -1808,11 +1812,19 @@ _e_client_eval(E_Client *ec) // transient parent if found ec->x = trans_ec->x + ((trans_ec->w - ec->w) / 2); ec->y = trans_ec->y + ((trans_ec->h - ec->h) / 2); + ERR("XXXXXX32 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); } else { ec->x = zx + ((zw - ec->w) / 2); ec->y = zy + ((zh - ec->h) / 2); + ERR("XXXXXX33 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); } ec->changes.pos = 1; ec->placed = 1; @@ -1870,16 +1882,27 @@ _e_client_eval(E_Client *ec) } ec->x = new_x; ec->y = new_y; + ERR("XXXXXX3 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); ec->changes.pos = 1; ec->placed = 1; ec->pre_cb.x = ec->x; ec->pre_cb.y = ec->y; } else if (!E_INSIDE(ec->x, ec->y, zx, zy, zw, zh)) { +// FIXFIX: this causes initial positioning of windows to be broken on restart +#if 0 /* If an ec is placed out of bound, fix it! */ ec->x = zx + ((zw - ec->w) / 2); ec->y = zy + ((zh - ec->h) / 2); ec->changes.pos = 1; + ERR("XXXXXX34 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); +#endif } /* Recreate state */ @@ -1892,6 +1915,10 @@ _e_client_eval(E_Client *ec) ec->x = zx + (zw - ec->w) / 2; ec->y = zy + (zh - ec->h) / 2; ec->changes.pos = 1; + ERR("XXXXXX35 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); } /* if the explicit geometry request asks for the app to be @@ -2053,6 +2080,10 @@ _e_client_eval(E_Client *ec) ec->x = x - (ec->w >> 1); e_comp_object_frame_geometry_get(ec->frame, NULL, NULL, &t, NULL); ec->y = y - (t >> 1); + ERR("XXXXXX4 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); EC_CHANGED(ec); ec->changes.pos = 1; } diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index 06b694318..ddf0e2d8a 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -961,6 +961,10 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y) cw->ec->x = x, cw->ec->y = y; cw->ec->client.x = x + cw->client_inset.l; cw->ec->client.y = y + cw->client_inset.t; + ERR("XXXXXX41 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(cw->ec), + cw->ec->client.w, cw->ec->client.h, + cw->ec->x, cw->ec->y); } return; } @@ -996,6 +1000,10 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y) /* only update during resize if triggered by resize */ if (e_client_util_resizing_get(cw->ec) && (!cw->force_move)) return; cw->ec->x = x, cw->ec->y = y; + ERR("XXXXXX42 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(cw->ec), + cw->ec->client.w, cw->ec->client.h, + cw->ec->x, cw->ec->y); if (cw->ec->new_client) { /* don't actually do anything until first client idler loop */ @@ -1009,6 +1017,10 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y) * first damage region if it is not a new_client. */ if (!cw->ec->shading) { + ERR("MOVING %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(cw->ec), + cw->ec->client.w, cw->ec->client.h, + ix, iy); cw->ec->client.x = ix; cw->ec->client.y = iy; } @@ -1574,6 +1586,11 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw) evas_object_show(cw->smart_obj); return; } + printf("MOOOOOOOOOOV %x -->>>>>>> %ix%i to %i %i\n", + (unsigned int)e_client_util_win_get(cw->ec), + cw->ec->client.w, cw->ec->client.h, + cw->ec->x, cw->ec->y); + /* re-set geometry */ evas_object_move(cw->smart_obj, cw->ec->x, cw->ec->y); /* ensure that some kind of frame calc has occurred if there's a frame */ @@ -3286,8 +3303,15 @@ reshadow: _e_comp_smart_cb_frame_recalc(cw, cw->smart_obj, NULL); if ((cw->x == -1) && (cw->y == -1) && cw->ec->new_client && (!cw->ec->placed)) { +// FIXFIX: this causes windows to move up +#if 0 cw->ec->x = MAX(cw->ec->zone->x, cw->ec->client.x - cw->client_inset.l); cw->ec->y = MAX(cw->ec->zone->y, cw->ec->client.y - cw->client_inset.t); + ERR("XXXXXX44 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(cw->ec), + cw->ec->client.w, cw->ec->client.h, + cw->ec->x, cw->ec->y); +#endif } /* this guarantees that we won't get blocked by the NOP check in the interceptor */ cw->y = cw->x = -99999; diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index 6cb50b5ed..eab83c43a 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -254,7 +254,11 @@ _e_comp_x_client_new_helper(E_Client *ec) ec->input_only = ec->comp_data->initial_attributes.input_only; ec->border_size = ec->comp_data->initial_attributes.border; ec->icccm.accepts_focus = (!ec->override) && (!ec->input_only); - //INF("NEW CLIENT: %d,%d -> %d,%d", ec->x, ec->y, ec->comp_data->initial_attributes.x, ec->comp_data->initial_attributes.y); + printf("NEW CLIENT: %x -->> %ix%i | %d,%d -> %d,%d\n", + win, + ec->comp_data->initial_attributes.w, ec->comp_data->initial_attributes.h, + ec->x, ec->y, + ec->comp_data->initial_attributes.x, ec->comp_data->initial_attributes.y); ec->x = ec->client.x = ec->comp_data->initial_attributes.x; ec->y = ec->client.y = ec->comp_data->initial_attributes.y; if (ec->override && ((ec->x == -77) && (ec->y == -777))) @@ -3555,6 +3559,10 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) ec->x = att->x; ec->y = att->y; } + ERR("XXXXXX91 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); /* * This ensures that windows that like to open with a x/y @@ -3570,6 +3578,10 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) if (ec->y < zy) ec->y = zy; + ERR("XXXXXX71 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); /* ensure we account for windows which already have client_inset; * fixes lots of wine placement issues */ @@ -3584,6 +3596,10 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) if (ec->y + ec->h > zy + zh) ec->y = zy + zh - ec->h; + ERR("XXXXXX72 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); // <-- if (e_comp_zone_xy_get(ec->x, ec->y)) { @@ -3591,6 +3607,10 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) { ec->x = E_CLAMP(ec->x, ec->zone->x, ec->zone->x + ec->zone->w); ec->y = E_CLAMP(ec->y, ec->zone->y, ec->zone->y + ec->zone->h); + ERR("XXXXXX73 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); } /* some application failing to correctly center a window */ if (eina_list_count(e_comp->zones) > 1) @@ -3599,6 +3619,10 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) ec->x = ((ec->zone->x + ec->zone->w) / 2) - (ec->w / 2); if (abs((e_comp->h / 2) - ec->y - (ec->h / 2)) < 3) ec->y = ((ec->zone->y + ec->zone->h) / 2) - (ec->h / 2); + ERR("XXXXXX74 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); } ec->changes.pos = 1; ec->placed = 1; @@ -4146,6 +4170,10 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) ec->e.fetch.video_position = 0; ec->x = ec->e.state.video_position.x; ec->y = ec->e.state.video_position.y; + ERR("XXXXXX93 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); fprintf(stderr, "internal position has been updated [%i, %i]\n", ec->e.state.video_position.x, ec->e.state.video_position.y); } diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c index 3ca5f21a0..315395509 100644 --- a/src/bin/e_hints.c +++ b/src/bin/e_hints.c @@ -1401,8 +1401,11 @@ e_hints_window_size_get(E_Client *ec) ec->y = sizes[1]; ec->w = sizes[2]; ec->h = sizes[3]; + ERR("XXXXXX1 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); #endif - return 1; } diff --git a/src/bin/e_remember.c b/src/bin/e_remember.c index 62147f473..866c13f6c 100644 --- a/src/bin/e_remember.c +++ b/src/bin/e_remember.c @@ -770,6 +770,10 @@ _e_remember_cb_hook_pre_post_fetch(void *data EINA_UNUSED, E_Client *ec) { ec->x = rem->prop.pos_x; ec->y = rem->prop.pos_y; + ERR("XXXXXX91 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); if (ec->zone->w != rem->prop.res_x) { int px; @@ -782,6 +786,10 @@ _e_remember_cb_hook_pre_post_fetch(void *data EINA_UNUSED, E_Client *ec) else ec->x = ((rem->prop.pos_x - 0) * ec->zone->w) / (rem->prop.res_x / 3); + ERR("XXXXXX92 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); } else if (px < ((rem->prop.res_x * 2) / 3)) { @@ -794,6 +802,10 @@ _e_remember_cb_hook_pre_post_fetch(void *data EINA_UNUSED, E_Client *ec) (((px - (rem->prop.res_x / 2)) * ec->zone->w) / (rem->prop.res_x / 3)) - (ec->w / 2); + ERR("XXXXXX93 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); } else { @@ -806,12 +818,20 @@ _e_remember_cb_hook_pre_post_fetch(void *data EINA_UNUSED, E_Client *ec) (((rem->prop.pos_x - rem->prop.res_x) * ec->zone->w) / (rem->prop.res_x / 3)) + (rem->prop.w - ec->client.w); + ERR("XXXXXX94 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); } if ((rem->prop.pos_x >= 0) && (ec->x < 0)) ec->x = 0; else if (((rem->prop.pos_x + rem->prop.w) < rem->prop.res_x) && ((ec->x + ec->w) > ec->zone->w)) ec->x = ec->zone->w - ec->w; + ERR("XXXXXX95 %x which is %ix%i to %i %i", + (unsigned int)e_client_util_win_get(ec), + ec->client.w, ec->client.h, + ec->x, ec->y); } if (ec->zone->h != rem->prop.res_y) {