MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / configure

Method configure

source/x11/xwindow.cpp:1007–1058  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1005}
1006
1007int XWindow::configure(U32 mask, XWindowChanges* changes) {
1008 bool sizeChanged = false;
1009 U32 width = this->width();
1010 U32 height = this->height();
1011
1012 if (mask & CWX) {
1013 left = changes->x;
1014 sizeChanged = true;
1015 }
1016 if (mask & CWY) {
1017 top = changes->y;
1018 sizeChanged = true;
1019 }
1020 if (mask & CWWidth) {
1021 width = changes->width;
1022 sizeChanged = true;
1023 }
1024 if (mask & CWHeight) {
1025 height = changes->height;
1026 sizeChanged = true;
1027 }
1028 if (mask & CWBorderWidth) {
1029 border_width = changes->border_width;
1030 }
1031 if (mask & CWSibling) {
1032 kpanic("XReconfigureWMWindow CWSibling not handled");
1033 }
1034 if (mask & CWStackMode) {
1035 if (parent) {
1036 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(parent->childrenMutex);
1037 int index = vectorIndexOf(parent->zchildren, shared_from_this());
1038 if (index >= 0 && index < (int)parent->zchildren.size() - 1) {
1039 parent->zchildren.erase(parent->zchildren.begin() + index);
1040 parent->zchildren.push_back(shared_from_this());
1041 }
1042 }
1043 }
1044 if (sizeChanged) {
1045 if (width != this->width() || height != this->height()) {
1046 setSize(width, height);
1047 }
1048 KNativeSystem::moveWindow(shared_from_this());
1049 }
1050 configureNotify();
1051 // :TODO:
1052 if (c_class == InputOutput && isMapped) {
1053 XServer::getServer()->iterateEventMask(id, ExposureMask, [this](const DisplayDataPtr& data) {
1054 exposeNofity(data, 0, 0, this->width(), this->height(), 0);
1055 });
1056 }
1057 return Success;
1058}
1059
1060
1061bool XWindow::isTransient() {

Callers 2

x11_ConfigureWindowFunction · 0.80
x11_ReconfigureWMWindowFunction · 0.80

Calls 9

kpanicFunction · 0.85
vectorIndexOfFunction · 0.85
heightMethod · 0.80
iterateEventMaskMethod · 0.80
widthMethod · 0.45
sizeMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected