view->x, view->y);
}
if ((int)pending->width == view->w && (int)pending->height == view->h) {
- /* We reached the end of all queued size changing configure events */
+ /*
+ * We reached the end of all queued size changing configure
+ * events
+ */
pending->update_x = false;
pending->update_y = false;
}
* move, typically because the user clicked on their client-side
* decorations. Note that a more sophisticated compositor should check
* the provied serial against a list of button press serials sent to
- * this
- * client, to prevent the client from requesting this whenever they
+ * this client, to prevent the client from requesting this whenever they
* want.
*/
struct view *view = wl_container_of(listener, view, request_move);
* resize, typically because the user clicked on their client-side
* decorations. Note that a more sophisticated compositor should check
* the provied serial against a list of button press serials sent to
- * this
- * client, to prevent the client from requesting this whenever they
+ * this client, to prevent the client from requesting this whenever they
* want.
*/
struct wlr_xwayland_resize_event *event = data;
}
static int
-round_to_increment(int val, int base, int inc) {
- if (base < 0 || inc <= 0)
+round_to_increment(int val, int base, int inc)
+{
+ if (base < 0 || inc <= 0) {
return val;
+ }
return base + (val - base + inc / 2) / inc * inc;
}
static void
configure(struct view *view, struct wlr_box geo)
{
- // honor size increments from WM_SIZE_HINTS
+ /*
+ * Honor size increments from WM_SIZE_HINTS. Typically, X11 terminal
+ * emulators will use WM_SIZE_HINTS to make sure that the terminal is
+ * resized to a width/height evenly divisible by the cell (character)
+ * size.
+ */
struct wlr_xwayland_surface_size_hints *hints =
view->xwayland_surface->size_hints;
if (hints) {
view->pending_move_resize.width = geo.width;
view->pending_move_resize.height = geo.height;
wlr_xwayland_surface_configure(view->xwayland_surface, (int16_t)geo.x,
- (int16_t)geo.y, (uint16_t)geo.width,
- (uint16_t)geo.height);
+ (int16_t)geo.y, (uint16_t)geo.width, (uint16_t)geo.height);
}
static void