diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-03-09 11:45:02 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-05-14 16:10:32 +0100 |
commit | 60550230a71be950b77927830bc22a58547edbd5 (patch) | |
tree | ce8fce70b6bc8cee8381d549a8f9c317f35df472 /overlay/x11/x11-overlay.c | |
parent | b871b10f2a6250d6dbe31665b267820fee829c84 (diff) |
overlay: Remove the miscalculation of window position
We already call x11_position() to calculate the position of the
overlay, so do not need to manually recompute them inside
x11_overlay_create(). This has the advantage that x11_position()
understands the multi-monitor layout instructions.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'overlay/x11/x11-overlay.c')
-rw-r--r-- | overlay/x11/x11-overlay.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/overlay/x11/x11-overlay.c b/overlay/x11/x11-overlay.c index d08ebfc9..ae649429 100644 --- a/overlay/x11/x11-overlay.c +++ b/overlay/x11/x11-overlay.c @@ -271,22 +271,6 @@ x11_overlay_create(struct config *config, int *width, int *height) priv->x = x; priv->y = y; - if (position != POS_UNSET) { - switch (position & 7) { - default: - case 0: priv->x = 0; break; - case 1: priv->x = (scr->width - image->width)/2; break; - case 2: priv->x = scr->width - image->width; break; - } - - switch ((position >> 4) & 7) { - default: - case 0: priv->y = 0; break; - case 1: priv->y = (scr->height - image->height)/2; break; - case 2: priv->y = scr->height - image->height; break; - } - } - priv->image = image; priv->image->data = (void *)&priv->name; |