MCPcopy Create free account
hub / github.com/Adaptix-Framework/AdaptixC2 / makeWindow

Method makeWindow

AdaptixClient/Libs/kddockwidgets/core/Stack.cpp:111–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111std::unique_ptr<WindowBeingDragged> Stack::makeWindow()
112{
113 // This is called when using Flag_HideTitleBarWhenTabsVisible
114 // For detaching individual tabs, TabBar::makeWindow() is called.
115
116 if (auto fw = view()->rootView()->asFloatingWindowController()) {
117 if (fw->hasSingleGroup()) {
118 // We're already in a floating window, and it only has 1 dock widget.
119 // So there's no detachment to be made, we just move the window.
120 return std::make_unique<WindowBeingDragged>(fw, this);
121 }
122 }
123
124 Rect r = d->m_group->view()->geometry();
125
126 const Point globalPoint = view()->mapToGlobal(Point(0, 0));
127
128 auto floatingWindow = new FloatingWindow(d->m_group, {});
129 r.moveTopLeft(globalPoint);
130 floatingWindow->setSuggestedGeometry(r, SuggestedGeometryHint_GeometryIsFromDocked);
131 floatingWindow->view()->show();
132
133 return std::make_unique<WindowBeingDragged>(floatingWindow, this);
134}
135
136bool Stack::isWindow() const
137{

Callers 3

setFloatingMethod · 0.45
dropMethod · 0.45
onEntryMethod · 0.45

Calls 10

PointClass · 0.85
moveTopLeftMethod · 0.80
setSuggestedGeometryMethod · 0.80
rootViewMethod · 0.45
hasSingleGroupMethod · 0.45
geometryMethod · 0.45
viewMethod · 0.45
mapToGlobalMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected