Changeset View
Changeset View
Standalone View
Standalone View
src/Application.cpp
Show First 20 Lines • Show All 180 Lines • ▼ Show 20 Line(s) | |||||
181 | } | 181 | } | ||
182 | 182 | | |||
183 | void Application::detachView(Session *session) | 183 | void Application::detachView(Session *session) | ||
184 | { | 184 | { | ||
185 | MainWindow *currentWindow = qobject_cast<MainWindow*>(sender()); | 185 | MainWindow *currentWindow = qobject_cast<MainWindow*>(sender()); | ||
186 | MainWindow *window = newMainWindow(); | 186 | MainWindow *window = newMainWindow(); | ||
187 | ViewManager *manager = window->viewManager(); | 187 | ViewManager *manager = window->viewManager(); | ||
188 | 188 | | |||
189 | manager->createView(manager->activeContainer(), session); | 189 | manager->createView(session); | ||
190 | 190 | | |||
191 | // Since user is dragging and dropping, move dnd window to where | 191 | // Since user is dragging and dropping, move dnd window to where | ||
192 | // the user has the cursor (correct multiple monitor setups). | 192 | // the user has the cursor (correct multiple monitor setups). | ||
193 | window->move(QCursor::pos()); | 193 | window->move(QCursor::pos()); | ||
194 | window->resize(currentWindow->geometry().width(), currentWindow->geometry().height()); | 194 | window->resize(currentWindow->geometry().width(), currentWindow->geometry().height()); | ||
195 | window->show(); | 195 | window->show(); | ||
196 | } | 196 | } | ||
197 | 197 | | |||
anthonyfieroni: It's not work on Wayland, no? Also don't set geometry, KWin will not like it. Use resize and… | |||||
I did not tested on wayland, my system woesn't work with it yet because of nvidia. I accept patches. :) tcanabrava: I did not tested on wayland, my system woesn't work with it yet because of nvidia. I accept… | |||||
198 | int Application::newInstance() | 198 | int Application::newInstance() | ||
199 | { | 199 | { | ||
200 | // handle session management | 200 | // handle session management | ||
201 | 201 | | |||
202 | // returns from processWindowArgs(args, createdNewMainWindow) | 202 | // returns from processWindowArgs(args, createdNewMainWindow) | ||
203 | // if a new window was created | 203 | // if a new window was created | ||
204 | bool createdNewMainWindow = false; | 204 | bool createdNewMainWindow = false; | ||
205 | 205 | | |||
▲ Show 20 Lines • Show All 399 Lines • Show Last 20 Lines |
It's not work on Wayland, no? Also don't set geometry, KWin will not like it. Use resize and move to coor by parents ones.