Changeset View
Changeset View
Standalone View
Standalone View
debug_console.cpp
Show All 13 Lines | |||||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. | ||
16 | 16 | | |||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #include "debug_console.h" | 20 | #include "debug_console.h" | ||
21 | #include "composite.h" | 21 | #include "composite.h" | ||
22 | #include "client.h" | 22 | #include "x11client.h" | ||
23 | #include "input_event.h" | 23 | #include "input_event.h" | ||
24 | #include "internal_client.h" | 24 | #include "internal_client.h" | ||
25 | #include "main.h" | 25 | #include "main.h" | ||
26 | #include "scene.h" | 26 | #include "scene.h" | ||
27 | #include "xdgshellclient.h" | 27 | #include "xdgshellclient.h" | ||
28 | #include "unmanaged.h" | 28 | #include "unmanaged.h" | ||
29 | #include "wayland_server.h" | 29 | #include "wayland_server.h" | ||
30 | #include "workspace.h" | 30 | #include "workspace.h" | ||
▲ Show 20 Lines • Show All 781 Lines • ▼ Show 20 Line(s) | 793 | { | |||
812 | for (auto c : x11Clients) { | 812 | for (auto c : x11Clients) { | ||
813 | m_x11Clients.append(c); | 813 | m_x11Clients.append(c); | ||
814 | } | 814 | } | ||
815 | const auto x11DesktopClients = workspace()->desktopList(); | 815 | const auto x11DesktopClients = workspace()->desktopList(); | ||
816 | for (auto c : x11DesktopClients) { | 816 | for (auto c : x11DesktopClients) { | ||
817 | m_x11Clients.append(c); | 817 | m_x11Clients.append(c); | ||
818 | } | 818 | } | ||
819 | connect(workspace(), &Workspace::clientAdded, this, | 819 | connect(workspace(), &Workspace::clientAdded, this, | ||
820 | [this] (Client *c) { | 820 | [this] (X11Client *c) { | ||
821 | add(s_x11ClientId -1, m_x11Clients, c); | 821 | add(s_x11ClientId -1, m_x11Clients, c); | ||
822 | } | 822 | } | ||
823 | ); | 823 | ); | ||
824 | connect(workspace(), &Workspace::clientRemoved, this, | 824 | connect(workspace(), &Workspace::clientRemoved, this, | ||
825 | [this] (AbstractClient *ac) { | 825 | [this] (AbstractClient *ac) { | ||
826 | Client *c = qobject_cast<Client*>(ac); | 826 | X11Client *c = qobject_cast<X11Client *>(ac); | ||
827 | if (!c) { | 827 | if (!c) { | ||
828 | return; | 828 | return; | ||
829 | } | 829 | } | ||
830 | remove(s_x11ClientId -1, m_x11Clients, c); | 830 | remove(s_x11ClientId -1, m_x11Clients, c); | ||
831 | } | 831 | } | ||
832 | ); | 832 | ); | ||
833 | 833 | | |||
834 | const auto unmangeds = workspace()->unmanagedList(); | 834 | const auto unmangeds = workspace()->unmanagedList(); | ||
▲ Show 20 Lines • Show All 277 Lines • ▼ Show 20 Line(s) | 1090 | { | |||
1112 | if (index.internalId() & s_propertyBitMask) { | 1112 | if (index.internalId() & s_propertyBitMask) { | ||
1113 | if (index.column() >= 2 || role != Qt::DisplayRole) { | 1113 | if (index.column() >= 2 || role != Qt::DisplayRole) { | ||
1114 | return QVariant(); | 1114 | return QVariant(); | ||
1115 | } | 1115 | } | ||
1116 | if (XdgShellClient *c = shellClient(index)) { | 1116 | if (XdgShellClient *c = shellClient(index)) { | ||
1117 | return propertyData(c, index, role); | 1117 | return propertyData(c, index, role); | ||
1118 | } else if (InternalClient *c = internalClient(index)) { | 1118 | } else if (InternalClient *c = internalClient(index)) { | ||
1119 | return propertyData(c, index, role); | 1119 | return propertyData(c, index, role); | ||
1120 | } else if (Client *c = x11Client(index)) { | 1120 | } else if (X11Client *c = x11Client(index)) { | ||
1121 | return propertyData(c, index, role); | 1121 | return propertyData(c, index, role); | ||
1122 | } else if (Unmanaged *u = unmanaged(index)) { | 1122 | } else if (Unmanaged *u = unmanaged(index)) { | ||
1123 | return propertyData(u, index, role); | 1123 | return propertyData(u, index, role); | ||
1124 | } | 1124 | } | ||
1125 | } else { | 1125 | } else { | ||
1126 | if (index.column() != 0) { | 1126 | if (index.column() != 0) { | ||
1127 | return QVariant(); | 1127 | return QVariant(); | ||
1128 | } | 1128 | } | ||
Show All 37 Lines | 1165 | { | |||
1166 | return clientForIndex(index, m_shellClients, s_waylandClientId); | 1166 | return clientForIndex(index, m_shellClients, s_waylandClientId); | ||
1167 | } | 1167 | } | ||
1168 | 1168 | | |||
1169 | InternalClient *DebugConsoleModel::internalClient(const QModelIndex &index) const | 1169 | InternalClient *DebugConsoleModel::internalClient(const QModelIndex &index) const | ||
1170 | { | 1170 | { | ||
1171 | return clientForIndex(index, m_internalClients, s_workspaceInternalId); | 1171 | return clientForIndex(index, m_internalClients, s_workspaceInternalId); | ||
1172 | } | 1172 | } | ||
1173 | 1173 | | |||
1174 | Client *DebugConsoleModel::x11Client(const QModelIndex &index) const | 1174 | X11Client *DebugConsoleModel::x11Client(const QModelIndex &index) const | ||
1175 | { | 1175 | { | ||
1176 | return clientForIndex(index, m_x11Clients, s_x11ClientId); | 1176 | return clientForIndex(index, m_x11Clients, s_x11ClientId); | ||
1177 | } | 1177 | } | ||
1178 | 1178 | | |||
1179 | Unmanaged *DebugConsoleModel::unmanaged(const QModelIndex &index) const | 1179 | Unmanaged *DebugConsoleModel::unmanaged(const QModelIndex &index) const | ||
1180 | { | 1180 | { | ||
1181 | return clientForIndex(index, m_unmanageds, s_x11UnmanagedId); | 1181 | return clientForIndex(index, m_unmanageds, s_x11UnmanagedId); | ||
1182 | } | 1182 | } | ||
▲ Show 20 Lines • Show All 332 Lines • Show Last 20 Lines |