#include "xwlprimary.h"

XwlPrimary::XwlPrimary(xcb_atom_t atom, xcb_window_t parent, const xcb_query_extension_reply_t *queryExtension, xcb_connection_t *xcbConn)
    : XwlSelection(atom, parent, queryExtension, xcbConn)
{
    const uint32_t clipboardValues[] = {XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_PROPERTY_CHANGE};
    xcb_create_window(xcbConn,
                      XCB_COPY_FROM_PARENT,
                      window(),
                      parent,
                      0, 0,
                      10, 10,
                      0,
                      XCB_WINDOW_CLASS_INPUT_OUTPUT,
                      XCB_COPY_FROM_PARENT,
                      XCB_CW_EVENT_MASK,
                      clipboardValues);
    xcb_flush(xcbConn);
}

XwlPrimary::~XwlPrimary()
{

}

void XwlPrimary::doHandleXfixesNotify(xcb_xfixes_selection_notify_event_t *event)
{

}

bool XwlPrimary::handleSelectionNotify(xcb_selection_notify_event_t *event)
{
    return XwlSelection::handleSelectionNotify(event);
}
