summaryrefslogtreecommitdiff
path: root/src/compositor.h
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-05-02 10:21:38 -0400
committerJason Ekstrand <jason.ekstrand@intel.com>2014-07-17 13:59:01 -0700
commitccf48fb4f9923e59e82911a2c03dda9bc70541a0 (patch)
tree74fd61fddacf0cc9d78929f267519a799ade7aa0 /src/compositor.h
parentbd65e508753b8c1eeadcaa1c223bace2a3477083 (diff)
downloadweston-ccf48fb4f9923e59e82911a2c03dda9bc70541a0.tar.gz
shell: Replace set_margin with set_window_geometry
Currently, there is a fun flicker when toggling maximization or fullscreen on a window in mutter or more sophisicated compositors and WMs. What happens is that the client want so go maximized, so we calculate the size that we want the window to resize to (640x480), and then add on its margins to find the buffer size (+10 = 660x500), and then send out a configure event for that size. The client renders to that size, realizes that it's maximized, and then says "oh hey, my margins are actually 0 now!", and so the compositor has to send out another configure event. In order to fix this, make the the configure request correspond to the window geometry we'd like the window to be at. At the same time, replace set_margin with set_window_geometry, where we specify a rect rather than a border around the window.
Diffstat (limited to 'src/compositor.h')
-rw-r--r--src/compositor.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compositor.h b/src/compositor.h
index bef5e1d9..d4a2dbb7 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -110,9 +110,9 @@ struct weston_shell_interface {
struct weston_seat *ws, uint32_t edges);
void (*set_title)(struct shell_surface *shsurf,
const char *title);
- void (*set_margin)(struct shell_surface *shsurf,
- int32_t left, int32_t right,
- int32_t top, int32_t bottom);
+ void (*set_window_geometry)(struct shell_surface *shsurf,
+ int32_t x, int32_t y,
+ int32_t width, int32_t height);
};
struct weston_animation {