struct wl_listener surface_commit_listener;
struct wl_signal destroy_signal;
+ int x, y;
+
Eina_Bool has_cache_data;
};
static void _e_foreign_shell_viewport_update(E_Foreign_Shell *fs);
static void _e_foreign_shell_rotation_update(E_Foreign_Shell *fs);
static void _e_foreign_shell_place_under_exported(E_Foreign_Shell *fs);
+static void _e_foreign_shell_state_sync_with_exported(E_Foreign_Shell *fs);
static void _e_foreign_shell_exported_restack_handler_add(E_Foreign_Shell *fs);
static void _e_foreign_shell_exported_restack_handler_remove(E_Foreign_Shell *fs);
static void _e_foreign_shell_exported_destroy_handler_add(E_Foreign_Shell *fs);
{
E_Exported_Shell *es;
E_Client *esc;
- int x, y;
es = data;
esc = wl_resource_get_user_data(es->surface);
- evas_object_geometry_get(esc->frame, &x, &y, NULL, NULL);
+ evas_object_geometry_get(esc->frame, &es->x, &es->y, NULL, NULL);
if (es->foreign)
- _e_foreign_shell_destination_set(es->foreign, x, y, es->stage.width, es->stage.height);
+ {
+ _e_foreign_shell_destination_set(es->foreign,
+ es->x, es->y,
+ es->stage.width, es->stage.height);
+ }
e_util_transform_viewport_set(es->transform,
- x, y,
+ es->x, es->y,
es->stage.width,
es->stage.height);
e_client_transform_core_update(esc);
e_comp_wl_map_size_cal_from_buffer(fsc);
- if ((fsc->new_client) && (fs->exported))
- _e_foreign_shell_visible_set(fs, fs->exported->stage.map);
+ if (fsc->new_client)
+ _e_foreign_shell_state_sync_with_exported(fs);
}
/* TODO */
wtz_foreign_shell_send_transform_changed(fs->resource, transform);
}
+
+static void
+_e_foreign_shell_state_sync_with_exported(E_Foreign_Shell *fs)
+{
+ E_Exported_Shell *es;
+
+ es = fs->exported;
+ if (!es)
+ return;
+
+ _e_foreign_shell_visible_set(fs, es->stage.map);
+ _e_foreign_shell_destination_set(fs, es->x, es->y,
+ es->stage.width, es->stage.height);
+ _e_foreign_shell_transform_set(fs, es->stage.transform);
+}