diff --git a/shaders/frame.hlsl b/shaders/frame.hlsl index b2e68ff..dcb3618 100644 --- a/shaders/frame.hlsl +++ b/shaders/frame.hlsl @@ -55,7 +55,7 @@ void main(point float2 posh[1], inout TriangleStream stream){ #include "chamfer.hlsl" -#define STOCK_FRAME_STYLE 1 //select between two stock styles (1: chamfered edges, other: basic rectangle borders) +#define STOCK_FRAME_STYLE 0 //select between two stock styles (1: chamfered edges, other: basic rectangle borders) const float borderScaling = 1.0f; const float4 borderColor = float4(0.0f,0.0f,0.0f,1.0f); @@ -136,6 +136,7 @@ float4 main(float4 posh : SV_Position, float2 texc : TEXCOORD) : SV_Target{ return borderColor; } #endif //STOCK_FRAME_STYLE + float2 a_content = screen*(0.5f*xy0+0.5f); //top-left corner in pixels, content area float2 b_content = screen*(0.5f*xy1+0.5f); //bottom-right corner in pixels, content areaa if(any(posh.xy < a_content) || any(posh.xy > b_content)){ //title region diff --git a/src/backend.cpp b/src/backend.cpp index bf53e70..b12d43b 100644 --- a/src/backend.cpp +++ b/src/backend.cpp @@ -581,8 +581,6 @@ Default::Default(bool _standaloneComp) : X11Backend(), pdragClient(0), standalon pollTimer.tv_sec = 0; pollTimer.tv_nsec = 0; //polling = false; - - printf("------standalone comp: %u\n",standaloneComp); } Default::~Default(){ @@ -617,11 +615,12 @@ void Default::Start(){ xcb_grab_key(pcon,1,pscr->root,XCB_MOD_MASK_1|XCB_MOD_MASK_SHIFT,exitKeycode, XCB_GRAB_MODE_ASYNC,XCB_GRAB_MODE_ASYNC); - DefineBindings(); + if(!standaloneComp) + DefineBindings(); xcb_flush(pcon); - uint values[2] = {XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT + uint values[2] = {(!standaloneComp?XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT:0) |XCB_EVENT_MASK_STRUCTURE_NOTIFY |XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY |XCB_EVENT_MASK_EXPOSURE @@ -1510,6 +1509,7 @@ sint Default::HandleEvent(bool forcePoll){ case XCB_FOCUS_IN:{ xcb_focus_in_event_t *pev = (xcb_focus_in_event_t*)pevent; printf("XCB_FOCUS_IN: *** focus %x\n",pev->event); + //TODO: standaloneComp: set focus. All clients share the same container } break; case XCB_ENTER_NOTIFY:{