on xenial help sign in
Use the max value of an int for max window ID
efd3bd1Dalton Durst
plugins/WindowManager/TopLevelWindowModel.cpp+1−1
@@ -40,7 +40,7 @@ namespace unityapi = unity::shell::application;
40
40
41TopLevelWindowModel::TopLevelWindowModel()
41TopLevelWindowModel::TopLevelWindowModel()
42 : m_nullWindow(createNullWindow()),
42 : m_nullWindow(createNullWindow()),
43− m_maxWindowId(1000000),
43+ m_maxWindowId(std::numeric_limits<int>::max()),
44 m_surfaceManagerBusy(false)
44 m_surfaceManagerBusy(false)
45{
45{
46 connect(m_nullWindow, &Window::focusedChanged, this, [this] {
46 connect(m_nullWindow, &Window::focusedChanged, this, [this] {
plugins/WindowManager/TopLevelWindowModel.h−4
@@ -297,10 +297,6 @@ private:
297 bool m_pendingActivation;
297 bool m_pendingActivation;
298
298
299 QAtomicInteger<int> m_nextId{1};
299 QAtomicInteger<int> m_nextId{1};
300−
301− // Just something big enough that we don't risk running out of unused id numbers.
302− // Not sure if QML int type supports something close to std::numeric_limits<int>::max() and
303− // there's no reason to try out its limits.
304 int m_maxWindowId;
300 int m_maxWindowId;
305
301
306 unity::shell::application::ApplicationManagerInterface* m_applicationManager{nullptr};
302 unity::shell::application::ApplicationManagerInterface* m_applicationManager{nullptr};