MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / moveShadow

Method moveShadow

DSView/pv/winshadow.cpp:150–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150void WinShadow::moveShadow()
151{
152 WINDOWPLACEMENT wp;
153 wp.length = sizeof(WINDOWPLACEMENT);
154 GetWindowPlacement(m_hwnd, &wp);
155
156 if (wp.showCmd == SW_SHOWNORMAL){
157
158 RECT rc;
159 GetWindowRect(m_hwnd, &rc);
160
161 int bw = (SHADOW_BORDER_WIDTH - 1) * m_scale;
162
163 int x = rc.left;
164 int y = rc.top;
165 int w = rc.right - rc.left;
166 int h = rc.bottom - rc.top;
167
168 x -= bw;
169 y -= bw;
170 w += bw * 2;
171 h += bw * 2;
172
173 const HWND active_window = GetActiveWindow();
174 bool isActiveWindow = ((active_window == m_hwnd)
175 || IsChild(m_hwnd, active_window));
176
177 MoveWindow((HWND)winId(), x, y, w , h , 1);
178 }
179}
180
181void WinShadow::paintEvent(QPaintEvent *event)
182{

Callers 1

ResizeChildMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected