[PATCH weston 08/17] xwm: Remove support for transient windows
Tiago Vignatti
tiago.vignatti at intel.com
Fri Nov 30 11:20:03 PST 2012
Warning: this removes functionality (#3)
In preparation for split xwm as a client. In any case this wasn't functioning
properly and we need to change with a different scheme of forwarding the
global coordinates to X instead:
http://lists.freedesktop.org/archives/wayland-devel/2012-July/004537.html
Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
---
src/xwayland/window-manager.c | 58 +++++++----------------------------------
src/xwayland/window-manager.h | 1 -
2 files changed, 9 insertions(+), 50 deletions(-)
diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c
index 89cc1f2..16d592a 100644
--- a/src/xwayland/window-manager.c
+++ b/src/xwayland/window-manager.c
@@ -539,8 +539,6 @@ weston_wm_window_activate(struct wl_listener *listener, void *data)
if (wm->focus_window)
weston_wm_window_schedule_repaint(wm->focus_window);
wm->focus_window = window;
- if (window)
- wm->focus_latest = window;
if (wm->focus_window)
weston_wm_window_schedule_repaint(wm->focus_window);
}
@@ -1613,52 +1611,6 @@ static const struct weston_shell_client shell_client = {
};
static void
-xserver_map_shell_surface(struct weston_wm *wm,
- struct weston_wm_window *window)
-{
- struct weston_shell_interface *shell_interface =
- &wm->server->compositor->shell_interface;
- struct weston_wm_window *parent;
- struct theme *t = window->wm->theme;
- int parent_id, x = 0, y = 0;
-
- if (!shell_interface->create_shell_surface)
- return;
-
- window->shsurf =
- shell_interface->create_shell_surface(shell_interface->shell,
- window->surface,
- &shell_client);
-
- /* ICCCM 4.1.1 */
- if (!window->override_redirect) {
- shell_interface->set_toplevel(window->shsurf);
- return;
- }
-
- /* not all non-toplevel has transient_for set. So we need this
- * workaround to guess a parent that will determine the relative
- * position of the transient surface */
- if (!window->transient_for)
- parent_id = wm->focus_latest->id;
- else
- parent_id = window->transient_for->id;
-
- parent = hash_table_lookup(wm->window_hash, parent_id);
-
- /* non-decorated and non-toplevel windows, e.g. sub-menus */
- if (!parent->decorate && parent->override_redirect) {
- x = parent->x + t->margin;
- y = parent->y + t->margin;
- }
-
- shell_interface->set_transient(window->shsurf, parent->surface,
- window->x + t->margin - x,
- window->y + t->margin - y,
- WL_SHELL_SURFACE_TRANSIENT_INACTIVE);
-}
-
-static void
xserver_set_window_id(struct wl_client *client, struct wl_resource *resource,
struct wl_resource *surface_resource, uint32_t id)
{
@@ -1666,6 +1618,8 @@ xserver_set_window_id(struct wl_client *client, struct wl_resource *resource,
struct weston_wm *wm = wxs->wm;
struct wl_surface *surface = surface_resource->data;
struct weston_wm_window *window;
+ struct weston_shell_interface *shell_interface =
+ &wm->server->compositor->shell_interface;
if (client != wxs->client)
return;
@@ -1686,7 +1640,13 @@ xserver_set_window_id(struct wl_client *client, struct wl_resource *resource,
&window->surface_destroy_listener);
weston_wm_window_schedule_repaint(window);
- xserver_map_shell_surface(wm, window);
+
+ window->shsurf =
+ shell_interface->create_shell_surface(shell_interface->shell,
+ window->surface,
+ &shell_client);
+
+ shell_interface->set_toplevel(window->shsurf);
}
const struct xserver_interface xserver_implementation = {
diff --git a/src/xwayland/window-manager.h b/src/xwayland/window-manager.h
index b9c063e..3409fa2 100644
--- a/src/xwayland/window-manager.h
+++ b/src/xwayland/window-manager.h
@@ -33,7 +33,6 @@ struct weston_wm {
struct weston_xserver *server;
xcb_window_t wm_window;
struct weston_wm_window *focus_window;
- struct weston_wm_window *focus_latest;
struct theme *theme;
xcb_cursor_t *cursors;
int last_cursor;
--
1.7.9.5
More information about the wayland-devel
mailing list