mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-10 13:29:55 -05:00
opt: remove useless code
This commit is contained in:
parent
8f1fb65169
commit
8c1d36cc0d
3 changed files with 0 additions and 22 deletions
|
|
@ -786,9 +786,6 @@ void resize(Client *c, struct wlr_box geo, int interact) {
|
||||||
c->geom.width = MAX(1 + 2 * (int)c->bw, c->geom.width);
|
c->geom.width = MAX(1 + 2 * (int)c->bw, c->geom.width);
|
||||||
c->geom.height = MAX(1 + 2 * (int)c->bw, c->geom.height);
|
c->geom.height = MAX(1 + 2 * (int)c->bw, c->geom.height);
|
||||||
} else { // 这里会限制不允许窗口划出屏幕
|
} else { // 这里会限制不允许窗口划出屏幕
|
||||||
client_set_bounds(
|
|
||||||
c, geo.width,
|
|
||||||
geo.height); // 去掉这个推荐的窗口大小,因为有时推荐的窗口特别大导致平铺异常
|
|
||||||
c->geom = geo;
|
c->geom = geo;
|
||||||
applybounds(
|
applybounds(
|
||||||
c,
|
c,
|
||||||
|
|
|
||||||
|
|
@ -101,24 +101,6 @@ static inline void client_activate_surface(struct wlr_surface *s,
|
||||||
wlr_xdg_toplevel_set_activated(toplevel, activated);
|
wlr_xdg_toplevel_set_activated(toplevel, activated);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32_t client_set_bounds(Client *c, int32_t width,
|
|
||||||
int32_t height) {
|
|
||||||
#ifdef XWAYLAND
|
|
||||||
if (client_is_x11(c))
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
if (wl_resource_get_version(c->surface.xdg->toplevel->resource) >=
|
|
||||||
XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION &&
|
|
||||||
width >= 0 && height >= 0 &&
|
|
||||||
(c->bounds.width != width || c->bounds.height != height)) {
|
|
||||||
c->bounds.width = width;
|
|
||||||
c->bounds.height = height;
|
|
||||||
return wlr_xdg_toplevel_set_bounds(c->surface.xdg->toplevel, width,
|
|
||||||
height);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline const char *client_get_appid(Client *c) {
|
static inline const char *client_get_appid(Client *c) {
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
if (client_is_x11(c))
|
if (client_is_x11(c))
|
||||||
|
|
|
||||||
|
|
@ -291,7 +291,6 @@ struct Client {
|
||||||
int isopensilent;
|
int isopensilent;
|
||||||
int iskilling;
|
int iskilling;
|
||||||
int isnamedscratchpad;
|
int isnamedscratchpad;
|
||||||
struct wlr_box bounds;
|
|
||||||
bool is_pending_open_animation;
|
bool is_pending_open_animation;
|
||||||
bool is_restoring_from_ov;
|
bool is_restoring_from_ov;
|
||||||
float scroller_proportion;
|
float scroller_proportion;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue