~ctwm/ctwm/trunk

« back to all changes in this revision

Viewing changes to windowbox.c

  • Committer: Matthew Fuller
  • Author(s): Maxime Soulé
  • Date: 2018-03-26 16:44:54 UTC
  • mto: (614.1.31 randr)
  • mto: This revision was merged to the branch mainline in revision 644.
  • Revision ID: fullermd@over-yonder.net-20180326164454-ytjak60vrgyqexwb
Some geometries can be relative to a monitor

It's the case for:
- f.moveresize `geometry`
- WindowBox
- WindowGeometries
- WorkSpaceManagerGeometry


git: 29a214153ebe2e7f12bc8bc227cbd65c5b4416fb

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#include "win_decorations.h"
18
18
#include "win_resize.h"
19
19
#include "win_utils.h"
 
20
#include "xparsegeometry.h"
20
21
 
21
22
name_list **addWindowBox(char *boxname, char *geometry)
22
23
{
48
49
                unsigned int w, h;
49
50
                Window win;
50
51
 
51
 
                mask = XParseGeometry(winbox->geometry, &x, &y, &w, &h);
 
52
                mask = RLayoutXParseGeometry(Scr->Layout, winbox->geometry,
 
53
                                             &x, &y, &w, &h);
52
54
                if(mask & XNegative) {
53
55
                        x += Scr->rootw  - w;
54
56
                        gravity = (mask & YNegative) ? SouthEastGravity : NorthEastGravity;