From 379aafa41a3dcdece43a72cf625995c5d0ae208d Mon Sep 17 00:00:00 2001 From: Milan Toth Date: Mon, 25 Apr 2022 11:13:02 +0200 Subject: [PATCH] fixed empty workspace bug --- meson.build | 2 +- src/sov/tree/tree_drawer.c | 2 +- tst/image_empty_6.bmp | Bin 0 -> 545038 bytes tst/runtests.sh | 2 + tst/tree_empty_6.json | 435 +++++++++++++++++++++++++++++++++++++ tst/workspace_empty_6.json | 53 +++++ 6 files changed, 492 insertions(+), 2 deletions(-) create mode 100644 tst/image_empty_6.bmp create mode 100644 tst/tree_empty_6.json create mode 100644 tst/workspace_empty_6.json diff --git a/meson.build b/meson.build index 9696c78..f5dbd04 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'sov', 'c', - version: '0.6', + version: '0.61', license: 'ISC', default_options: ['c_std=c99'] ) diff --git a/src/sov/tree/tree_drawer.c b/src/sov/tree/tree_drawer.c index b344b3e..2a8a735 100644 --- a/src/sov/tree/tree_drawer.c +++ b/src/sov/tree/tree_drawer.c @@ -52,7 +52,7 @@ void tree_drawer_draw( int wsnum_dy) { int max = cols; - if (workspaces->length > cols) + if (workspaces->length > 0) { sway_workspace_t* wsl = workspaces->data[workspaces->length - 1]; max = ceilf((float) wsl->number / cols) * cols; diff --git a/tst/image_empty_6.bmp b/tst/image_empty_6.bmp new file mode 100644 index 0000000000000000000000000000000000000000..846278f90e932412c64737b5e0ab888696135da7 GIT binary patch literal 545038 zcmeI3&5j&7dPUoY1b91u7T#(n8IS-;kOBQH1f#Wdt2XogZ!inLK>Lo-0jB5zy0&;KlR@${r8W5{q48^(f|MDw}024d_e#L z5P$##AOHafKmY;|fB*y_009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHaf zKmY;|fB*y_009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_ z009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U<00Izz z00b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0dYi`1h{GzqBQ_5Jo26xPf%xwZi=UCguYr2Xx6Ig33)~t9<;aD?) zwZ;~$jh$K6dTDU$x2iq{m5H4|8CY|+}-nPsh)27mG5g>`;}Ul0)RqI0ZWAics{ ztX%=}^dYb|9qAPUv33Q>(}$>ATRWwUwLd&OynOj``m_k#ARypBe*75o)9;0~4ZNmH zSTljO#$wHi*A$L56Ig3(-CBRQ8*Tmm{rks{AFWd){DOdh|Ni^$qlS9@uy%p;3U9G? z1<2Efz}j@AR|v$~6(CO^qHe9X*NwNmefw5_$=6SZrq7JPE&-ty@HcPXj5}(3Vy(;8 z*N8PATVFEPd~AKmSo5*U69GXM>PIiobBS0pIl72F$&$5KuU?(=f81-VUEnpnZLL)n z9o9^m+St=~$YrfztwnTeEpyk}TI;B7S%i+iz?#+C zvac;hrdV6jcyYr7P<_L4wn{_X7MiEb~n!es&iH2F38qTe|m=@y+(kQRpS?ZH}bReE#Fg@7g_b+XSIv0<;8t+h@SPyUGx;5eDTZrx_I&A zC(Z;R009U<00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U< z00Izz00bZa0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U<00Izz00bZa z0SG_<0uX=z1Rwwb2tWV=5P$##AOHafKmY;|fB*y_009U<00Izz00bZa0SG_<0uX?} HQzP)dVHPOG literal 0 HcmV?d00001 diff --git a/tst/runtests.sh b/tst/runtests.sh index f436ea2..1802760 100755 --- a/tst/runtests.sh +++ b/tst/runtests.sh @@ -3,6 +3,7 @@ build/test_tree -c tst/config_b -w tst/workspace_a.json -t tst/tree_a.json -o ts build/test_tree -c tst/config_a -w tst/workspace_b.json -t tst/tree_b.json -o tst/image_cfga_treeb_test.bmp build/test_tree -c tst/config_b -w tst/workspace_b.json -t tst/tree_b.json -o tst/image_cfgb_treeb_test.bmp build/test_tree -c tst/config_a -w tst/workspace_empty.json -t tst/tree_empty.json -o tst/image_empty_test.bmp +build/test_tree -c tst/config_a -w tst/workspace_empty_6.json -t tst/tree_empty_6.json -o tst/image_empty_6_test.bmp build/test_tree -c tst/config_a -w tst/workspace_floating.json -t tst/tree_floating.json -o tst/image_floating_test.bmp build/test_tree -c tst/config_a -w tst/workspace_feh.json -t tst/tree_feh.json -o tst/image_feh_test.bmp diff tst/image_cfga_treea.bmp tst/image_cfga_treea_test.bmp @@ -10,5 +11,6 @@ diff tst/image_cfgb_treea.bmp tst/image_cfgb_treea_test.bmp diff tst/image_cfga_treeb.bmp tst/image_cfga_treeb_test.bmp diff tst/image_cfgb_treeb.bmp tst/image_cfgb_treeb_test.bmp diff tst/image_empty.bmp tst/image_empty_test.bmp +diff tst/image_empty_6.bmp tst/image_empty_6_test.bmp diff tst/image_feh.bmp tst/image_feh_test.bmp diff tst/image_floating.bmp tst/image_floating_test.bmp diff --git a/tst/tree_empty_6.json b/tst/tree_empty_6.json new file mode 100644 index 0000000..bfc20f6 --- /dev/null +++ b/tst/tree_empty_6.json @@ -0,0 +1,435 @@ +{ + "id": 1, + "type": "root", + "orientation": "horizontal", + "percent": null, + "urgent": false, + "marks": [ + ], + "focused": false, + "layout": "splith", + "border": "none", + "current_border_width": 0, + "rect": { + "x": 0, + "y": 0, + "width": 1024, + "height": 768 + }, + "deco_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "window_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "geometry": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "name": "root", + "window": null, + "nodes": [ + { + "id": 2147483647, + "type": "output", + "orientation": "horizontal", + "percent": null, + "urgent": false, + "marks": [ + ], + "focused": false, + "layout": "output", + "border": "none", + "current_border_width": 0, + "rect": { + "x": 0, + "y": 0, + "width": 1024, + "height": 768 + }, + "deco_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "window_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "geometry": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "name": "__i3", + "window": null, + "nodes": [ + { + "id": 2147483646, + "type": "workspace", + "orientation": "horizontal", + "percent": null, + "urgent": false, + "marks": [ + ], + "focused": false, + "layout": "splith", + "border": "none", + "current_border_width": 0, + "rect": { + "x": 0, + "y": 0, + "width": 1024, + "height": 768 + }, + "deco_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "window_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "geometry": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "name": "__i3_scratch", + "window": null, + "nodes": [ + ], + "floating_nodes": [ + ], + "focus": [ + ], + "fullscreen_mode": 1, + "sticky": false + } + ], + "floating_nodes": [ + ], + "focus": [ + 2147483646 + ], + "fullscreen_mode": 0, + "sticky": false + }, + { + "id": 3, + "type": "output", + "orientation": "none", + "percent": 1.0, + "urgent": false, + "marks": [ + ], + "focused": false, + "layout": "output", + "border": "none", + "current_border_width": 0, + "rect": { + "x": 0, + "y": 0, + "width": 1024, + "height": 768 + }, + "deco_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "window_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "geometry": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "name": "Virtual-1", + "window": null, + "nodes": [ + { + "id": 7, + "type": "workspace", + "orientation": "horizontal", + "percent": null, + "urgent": false, + "marks": [ + ], + "focused": true, + "layout": "splith", + "border": "none", + "current_border_width": 0, + "rect": { + "x": 5, + "y": 29, + "width": 1014, + "height": 734 + }, + "deco_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "window_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "geometry": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "name": "6", + "window": null, + "nodes": [ + ], + "floating_nodes": [ + ], + "focus": [ + ], + "fullscreen_mode": 1, + "sticky": false, + "num": 6, + "output": "Virtual-1", + "representation": null + } + ], + "floating_nodes": [ + ], + "focus": [ + 7 + ], + "fullscreen_mode": 0, + "sticky": false, + "active": true, + "dpms": true, + "primary": false, + "make": "", + "model": "", + "serial": "", + "scale": 1.0, + "scale_filter": "nearest", + "transform": "normal", + "adaptive_sync_status": "disabled", + "current_workspace": "6", + "modes": [ + { + "width": 1024, + "height": 768, + "refresh": 60004 + }, + { + "width": 2560, + "height": 1600, + "refresh": 59987 + }, + { + "width": 2560, + "height": 1600, + "refresh": 59972 + }, + { + "width": 1920, + "height": 1440, + "refresh": 60000 + }, + { + "width": 1856, + "height": 1392, + "refresh": 59995 + }, + { + "width": 1792, + "height": 1344, + "refresh": 60000 + }, + { + "width": 2048, + "height": 1152, + "refresh": 60000 + }, + { + "width": 1920, + "height": 1200, + "refresh": 59885 + }, + { + "width": 1920, + "height": 1200, + "refresh": 59950 + }, + { + "width": 1920, + "height": 1080, + "refresh": 60000 + }, + { + "width": 1600, + "height": 1200, + "refresh": 60000 + }, + { + "width": 1680, + "height": 1050, + "refresh": 59954 + }, + { + "width": 1680, + "height": 1050, + "refresh": 59883 + }, + { + "width": 1400, + "height": 1050, + "refresh": 59978 + }, + { + "width": 1400, + "height": 1050, + "refresh": 59948 + }, + { + "width": 1600, + "height": 900, + "refresh": 60000 + }, + { + "width": 1280, + "height": 1024, + "refresh": 60020 + }, + { + "width": 1440, + "height": 900, + "refresh": 59887 + }, + { + "width": 1440, + "height": 900, + "refresh": 59901 + }, + { + "width": 1280, + "height": 960, + "refresh": 60000 + }, + { + "width": 1280, + "height": 854, + "refresh": 59951 + }, + { + "width": 1366, + "height": 768, + "refresh": 59790 + }, + { + "width": 1366, + "height": 768, + "refresh": 60000 + }, + { + "width": 1360, + "height": 768, + "refresh": 60015 + }, + { + "width": 1280, + "height": 800, + "refresh": 59810 + }, + { + "width": 1280, + "height": 800, + "refresh": 59910 + }, + { + "width": 1280, + "height": 768, + "refresh": 59870 + }, + { + "width": 1280, + "height": 768, + "refresh": 59995 + }, + { + "width": 1280, + "height": 720, + "refresh": 60000 + }, + { + "width": 1152, + "height": 768, + "refresh": 59950 + }, + { + "width": 800, + "height": 600, + "refresh": 60317 + }, + { + "width": 800, + "height": 600, + "refresh": 56250 + }, + { + "width": 848, + "height": 480, + "refresh": 60000 + }, + { + "width": 720, + "height": 480, + "refresh": 59938 + }, + { + "width": 640, + "height": 480, + "refresh": 59940 + } + ], + "current_mode": { + "width": 1024, + "height": 768, + "refresh": 60004 + }, + "max_render_time": 0 + } + ], + "floating_nodes": [ + ], + "focus": [ + 3 + ], + "fullscreen_mode": 0, + "sticky": false +} diff --git a/tst/workspace_empty_6.json b/tst/workspace_empty_6.json new file mode 100644 index 0000000..b22d811 --- /dev/null +++ b/tst/workspace_empty_6.json @@ -0,0 +1,53 @@ +[ + { + "id": 7, + "type": "workspace", + "orientation": "horizontal", + "percent": null, + "urgent": false, + "marks": [ + ], + "layout": "splith", + "border": "none", + "current_border_width": 0, + "rect": { + "x": 5, + "y": 29, + "width": 1014, + "height": 734 + }, + "deco_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "window_rect": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "geometry": { + "x": 0, + "y": 0, + "width": 0, + "height": 0 + }, + "name": "6", + "window": null, + "nodes": [ + ], + "floating_nodes": [ + ], + "focus": [ + ], + "fullscreen_mode": 1, + "sticky": false, + "num": 6, + "output": "Virtual-1", + "representation": null, + "focused": true, + "visible": true + } +]