forked from enlightenment/enlightenment
redo/simplify PRESENT usage in compositor to no longer use PRESENT
keith said no
This commit is contained in:
parent
2ef8c50a09
commit
462d79e147
|
@ -210,8 +210,6 @@ _e_comp_x_client_new_helper(E_Client *ec)
|
||||||
e_pixmap_visual_cmap_set(ec->pixmap, ec->comp_data->initial_attributes.visual, ec->comp_data->initial_attributes.colormap);
|
e_pixmap_visual_cmap_set(ec->pixmap, ec->comp_data->initial_attributes.visual, ec->comp_data->initial_attributes.colormap);
|
||||||
if (ec->override && (!ec->internal))
|
if (ec->override && (!ec->internal))
|
||||||
ecore_x_window_shape_events_select(win, 1);
|
ecore_x_window_shape_events_select(win, 1);
|
||||||
if (ec->override && (!ec->input_only))
|
|
||||||
ecore_x_present_select_events(win, ECORE_X_PRESENT_EVENT_MASK_CONFIGURE_NOTIFY);
|
|
||||||
if (ec->override && (!(ec->comp_data->initial_attributes.event_mask.mine & ECORE_X_EVENT_MASK_WINDOW_PROPERTY)))
|
if (ec->override && (!(ec->comp_data->initial_attributes.event_mask.mine & ECORE_X_EVENT_MASK_WINDOW_PROPERTY)))
|
||||||
ecore_x_event_mask_set(win, ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
|
ecore_x_event_mask_set(win, ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
|
||||||
|
|
||||||
|
@ -573,9 +571,11 @@ _e_comp_x_post_client_idler_cb(void *d EINA_UNUSED)
|
||||||
ecore_x_window_prop_card32_set(e_client_util_win_get(ec), ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, &opacity, 1);
|
ecore_x_window_prop_card32_set(e_client_util_win_get(ec), ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, &opacity, 1);
|
||||||
/* flag gets unset in property cb to avoid fetching opacity after we just set it */
|
/* flag gets unset in property cb to avoid fetching opacity after we just set it */
|
||||||
}
|
}
|
||||||
if (ec->post_resize && (!ecore_x_present_exists()))
|
if (ec->post_resize)
|
||||||
e_pixmap_dirty(ec->pixmap);
|
e_pixmap_dirty(ec->pixmap);
|
||||||
e_comp_object_render_update_del(ec->frame);
|
e_comp_object_render_update_del(ec->frame);
|
||||||
|
ec->comp_data->pw = ec->client.w;
|
||||||
|
ec->comp_data->ph = ec->client.h;
|
||||||
ec->post_move = 0;
|
ec->post_move = 0;
|
||||||
ec->post_resize = 0;
|
ec->post_resize = 0;
|
||||||
}
|
}
|
||||||
|
@ -2557,24 +2557,6 @@ _e_comp_x_grab_replay(void *data EINA_UNUSED, int type, void *event)
|
||||||
&ev2, NULL);
|
&ev2, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
|
||||||
_e_comp_x_present_configure(void *data EINA_UNUSED, int t EINA_UNUSED, Ecore_X_Event_Present_Configure *ev)
|
|
||||||
{
|
|
||||||
E_Client *ec;
|
|
||||||
|
|
||||||
ec = _e_comp_x_client_find_by_window(ev->win);
|
|
||||||
if (!ec) return ECORE_CALLBACK_RENEW;
|
|
||||||
if (e_pixmap_size_changed(ec->pixmap, ev->pixmap_width, ev->pixmap_height))
|
|
||||||
{
|
|
||||||
//WRN("PRESENT %p: %dx%d", ec, ev->pixmap_width, ev->pixmap_height);
|
|
||||||
e_pixmap_dirty(ec->pixmap);
|
|
||||||
e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
|
|
||||||
ec->comp_data->pw = ev->pixmap_width;
|
|
||||||
ec->comp_data->ph = ev->pixmap_height;
|
|
||||||
}
|
|
||||||
return ECORE_CALLBACK_RENEW;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_comp_x_hook_client_eval_end(void *d EINA_UNUSED, E_Client *ec)
|
_e_comp_x_hook_client_eval_end(void *d EINA_UNUSED, E_Client *ec)
|
||||||
{
|
{
|
||||||
|
@ -2710,7 +2692,6 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec)
|
||||||
pwin = ecore_x_window_override_new(ec->comp->man->root, ec->client.x, ec->client.y, w, h);
|
pwin = ecore_x_window_override_new(ec->comp->man->root, ec->client.x, ec->client.y, w, h);
|
||||||
ecore_x_window_shape_events_select(pwin, !ec->internal); //let's just agree never to do this with our own windows...
|
ecore_x_window_shape_events_select(pwin, !ec->internal); //let's just agree never to do this with our own windows...
|
||||||
}
|
}
|
||||||
ecore_x_present_select_events(pwin, ECORE_X_PRESENT_EVENT_MASK_CONFIGURE_NOTIFY);
|
|
||||||
|
|
||||||
if (ec->client.w && ec->client.h)
|
if (ec->client.w && ec->client.h)
|
||||||
/* force a resize here (no-op most of the time)
|
/* force a resize here (no-op most of the time)
|
||||||
|
@ -5194,8 +5175,6 @@ e_comp_x_init(void)
|
||||||
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_SYNC_ALARM,
|
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_SYNC_ALARM,
|
||||||
_e_comp_x_sync_alarm, NULL);
|
_e_comp_x_sync_alarm, NULL);
|
||||||
|
|
||||||
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_PRESENT_CONFIGURE, _e_comp_x_present_configure, NULL);
|
|
||||||
|
|
||||||
E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN,
|
E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN,
|
||||||
_e_comp_x_mouse_down, NULL);
|
_e_comp_x_mouse_down, NULL);
|
||||||
E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_BUTTON_UP,
|
E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_BUTTON_UP,
|
||||||
|
|
|
@ -332,9 +332,8 @@ e_pixmap_refresh(E_Pixmap *cp)
|
||||||
e_comp_object_native_surface_set(cp->client->frame, 0);
|
e_comp_object_native_surface_set(cp->client->frame, 0);
|
||||||
success = !!pixmap;
|
success = !!pixmap;
|
||||||
if (!success) break;
|
if (!success) break;
|
||||||
if (ecore_x_present_exists() && cp->client->comp_data &&
|
if (cp->client->comp_data &&
|
||||||
cp->client->comp_data->pw && cp->client->comp_data->ph &&
|
cp->client->comp_data->pw && cp->client->comp_data->ph)
|
||||||
(!e_client_util_resizing_get(cp->client))) //PRESENT is unreliable during resizes
|
|
||||||
{
|
{
|
||||||
pw = cp->client->comp_data->pw;
|
pw = cp->client->comp_data->pw;
|
||||||
ph = cp->client->comp_data->ph;
|
ph = cp->client->comp_data->ph;
|
||||||
|
|
Loading…
Reference in New Issue