mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-05 13:29:54 -05:00
feat: add option to set default scratchpad size
This commit is contained in:
parent
bc85232985
commit
263e2e4260
4 changed files with 22 additions and 4 deletions
10
src/maomao.c
10
src/maomao.c
|
|
@ -1695,10 +1695,12 @@ void show_scratchpad(Client *c) {
|
|||
/* return if fullscreen */
|
||||
if (!c->isfloating) {
|
||||
setfloating(c, 1);
|
||||
c->geom.width = c->scratchpad_geom.width ? c->scratchpad_geom.width
|
||||
: c->mon->w.width * 0.7;
|
||||
c->geom.height = c->scratchpad_geom.height ? c->scratchpad_geom.height
|
||||
: c->mon->w.height * 0.8;
|
||||
c->geom.width = c->scratchpad_geom.width
|
||||
? c->scratchpad_geom.width
|
||||
: c->mon->w.width * scratchpad_width_ratio;
|
||||
c->geom.height = c->scratchpad_geom.height
|
||||
? c->scratchpad_geom.height
|
||||
: c->mon->w.height * scratchpad_height_ratio;
|
||||
// 重新计算居中的坐标
|
||||
c->oldgeom = c->geom = c->animainit_geom = c->animation.current =
|
||||
setclient_coordinate_center(c, c->geom, 0, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue