Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
2a8395c7
Commit
2a8395c7
authored
Nov 27, 2020
by
Vlad Zahorodnii
Browse files
Trim trailing whitespace
parent
2acf25ae
Changes
28
Hide whitespace changes
Inline
Side-by-side
appmenu.cpp
View file @
2a8395c7
...
...
@@ -33,7 +33,7 @@ ApplicationMenu::ApplicationMenu(QObject *parent)
connect
(
m_appmenuInterface
,
&
OrgKdeKappmenuInterface
::
showRequest
,
this
,
&
ApplicationMenu
::
slotShowRequest
);
connect
(
m_appmenuInterface
,
&
OrgKdeKappmenuInterface
::
menuShown
,
this
,
&
ApplicationMenu
::
slotMenuShown
);
connect
(
m_appmenuInterface
,
&
OrgKdeKappmenuInterface
::
menuHidden
,
this
,
&
ApplicationMenu
::
slotMenuHidden
);
m_kappMenuWatcher
=
new
QDBusServiceWatcher
(
QStringLiteral
(
"org.kde.kappmenu"
),
QDBusConnection
::
sessionBus
(),
QDBusServiceWatcher
::
WatchForRegistration
|
QDBusServiceWatcher
::
WatchForUnregistration
,
this
);
...
...
autotests/integration/inputmethod_test.cpp
View file @
2a8395c7
...
...
@@ -84,10 +84,10 @@ void InputMethodTest::init()
Test
::
AdditionalWaylandInterface
::
InputMethodV1
|
Test
::
AdditionalWaylandInterface
::
TextInputManagerV3
));
screens
()
->
setCurrent
(
0
);
KWin
::
Cursors
::
self
()
->
mouse
()
->
setPos
(
QPoint
(
1280
,
512
));
const
QDBusMessage
message
=
QDBusMessage
::
createMethodCall
(
QStringLiteral
(
"org.kde.kwin.testvirtualkeyboard"
),
QStringLiteral
(
"/VirtualKeyboard"
),
QStringLiteral
(
"org.kde.kwin.VirtualKeyboard"
),
...
...
autotests/integration/test_helpers.cpp
View file @
2a8395c7
...
...
@@ -230,7 +230,7 @@ private:
MockInputMethod
::
MockInputMethod
(
struct
wl_registry
*
registry
,
int
id
,
int
version
)
:
QtWayland
::
zwp_input_method_v1
(
registry
,
id
,
version
)
{
}
MockInputMethod
::~
MockInputMethod
()
{
...
...
cursor.h
View file @
2a8395c7
...
...
@@ -285,7 +285,7 @@ public:
Cursor
*
currentCursor
()
const
{
return
m_currentCursor
;
}
static
Cursors
*
self
();
Q_SIGNALS:
...
...
data/update_default_rules.cpp
View file @
2a8395c7
...
...
@@ -54,5 +54,5 @@ int main( int argc, char* argv[] )
QDBusMessage
message
=
QDBusMessage
::
createSignal
(
"/KWin"
,
"org.kde.KWin"
,
"reloadConfig"
);
QDBusConnection
::
sessionBus
().
send
(
message
);
}
effects/blur/blur.cpp
View file @
2a8395c7
...
...
@@ -580,7 +580,7 @@ void BlurEffect::drawWindow(EffectWindow *w, int mask, const QRegion ®ion, Wi
shape
=
shape
.
translated
(
data
.
xTranslation
(),
data
.
yTranslation
());
shape
=
shape
&
region
;
}
EffectWindow
*
modal
=
w
->
transientFor
();
const
bool
transientForIsDock
=
(
modal
?
modal
->
isDock
()
:
false
);
...
...
events.cpp
View file @
2a8395c7
...
...
@@ -350,7 +350,7 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e)
if
(
c
==
nullptr
)
c
=
createUnmanaged
(
event
->
window
);
if
(
c
)
{
// if hasScheduledRelease is true, it means a unamp and map sequence has occurred.
// if hasScheduledRelease is true, it means a unamp and map sequence has occurred.
// since release is scheduled after map notify, this old Unmanaged will get released
// before KWIN has chance to remanage it again. so release it right now.
if
(
c
->
hasScheduledRelease
())
{
...
...
kcmkwin/kwincompositing/main.cpp
View file @
2a8395c7
...
...
@@ -171,7 +171,7 @@ void KWinCompositingKCM::init()
void
KWinCompositingKCM
::
onBackendChanged
()
{
const
int
currentType
=
m_form
.
backend
->
currentData
().
toInt
();
m_form
.
kcfg_glTextureFilter
->
setVisible
(
currentType
!=
CompositingTypeIndex
::
XRENDER_INDEX
);
m_form
.
kcfg_XRenderSmoothScale
->
setVisible
(
currentType
==
CompositingTypeIndex
::
XRENDER_INDEX
);
...
...
libinput/device.h
View file @
2a8395c7
...
...
@@ -121,7 +121,7 @@ class KWIN_EXPORT Device : public QObject
Q_PROPERTY
(
bool
lidSwitch
READ
isLidSwitch
CONSTANT
)
Q_PROPERTY
(
bool
tabletModeSwitch
READ
isTabletModeSwitch
CONSTANT
)
// Click Methods
// Click Methods
Q_PROPERTY
(
bool
supportsClickMethodAreas
READ
supportsClickMethodAreas
CONSTANT
)
Q_PROPERTY
(
bool
defaultClickMethodAreas
READ
defaultClickMethodAreas
CONSTANT
)
Q_PROPERTY
(
bool
clickMethodAreas
READ
isClickMethodAreas
WRITE
setClickMethodAreas
NOTIFY
clickMethodChanged
)
...
...
libkwineffects/kwinconfig.h.cmake
View file @
2a8395c7
...
...
@@ -10,7 +10,7 @@
#define KWINCONFIG_H
/*
These should be primarily used to detect what kind of compositing
support is available.
...
...
libkwineffects/kwineffects.h
View file @
2a8395c7
...
...
@@ -2095,7 +2095,7 @@ class KWINEFFECTS_EXPORT EffectWindow : public QObject
* @since 5.16
*/
Q_PROPERTY
(
QWindow
*
internalWindow
READ
internalWindow
CONSTANT
)
/**
* Whether this EffectWindow represents the outline.
*
...
...
platformsupport/scenes/opengl/drm_fourcc.h
View file @
2a8395c7
/*
* SPDX-FileCopyrightText: 2011 Intel Corporation
* SPDX-FileCopyrightText: 2011 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
...
...
plugins/kdecorations/aurorae/src/lib/auroraetheme.cpp
View file @
2a8395c7
...
...
@@ -232,7 +232,7 @@ void AuroraeTheme::borders(int& left, int& top, int& right, int& bottom, bool ma
minMargin
=
0
;
maxMargin
=
0
;
}
left
=
qBound
(
minMargin
,
d
->
themeConfig
.
borderLeft
(),
maxMargin
);
right
=
qBound
(
minMargin
,
d
->
themeConfig
.
borderRight
(),
maxMargin
);
bottom
=
qBound
(
minMargin
,
d
->
themeConfig
.
borderBottom
(),
maxMargin
);
...
...
plugins/platforms/drm/drm_backend.cpp
View file @
2a8395c7
...
...
@@ -238,7 +238,7 @@ void DrmBackend::openDrm()
qCWarning
(
KWIN_DRM
)
<<
"Did not find a GPU"
;
return
;
}
for
(
unsigned
int
gpu_index
=
0
;
gpu_index
<
devices
.
size
();
gpu_index
++
)
{
auto
device
=
std
::
move
(
devices
.
at
(
gpu_index
));
auto
devNode
=
QByteArray
(
device
->
devNode
());
...
...
@@ -277,7 +277,7 @@ void DrmBackend::openDrm()
m_gpus
.
append
(
gpu
);
break
;
}
// trying to activate Atomic Mode Setting (this means also Universal Planes)
if
(
!
qEnvironmentVariableIsSet
(
"KWIN_DRM_NO_AMS"
))
{
for
(
auto
gpu
:
m_gpus
)
...
...
@@ -291,7 +291,7 @@ void DrmBackend::openDrm()
if
(
m_outputs
.
isEmpty
())
{
qCDebug
(
KWIN_DRM
)
<<
"No connected outputs found on startup."
;
}
// setup udevMonitor
if
(
m_udevMonitor
)
{
m_udevMonitor
->
filterSubsystemDevType
(
"drm"
);
...
...
@@ -351,7 +351,7 @@ bool DrmBackend::updateOutputs()
const
auto
oldOutputs
=
m_outputs
;
for
(
auto
gpu
:
m_gpus
)
gpu
->
updateOutputs
();
std
::
sort
(
m_outputs
.
begin
(),
m_outputs
.
end
(),
[]
(
DrmOutput
*
a
,
DrmOutput
*
b
)
{
return
a
->
m_conn
->
id
()
<
b
->
m_conn
->
id
();
});
if
(
oldOutputs
!=
m_outputs
)
{
readOutputsConfiguration
();
...
...
plugins/platforms/drm/drm_backend.h
View file @
2a8395c7
...
...
@@ -61,7 +61,7 @@ public:
void
init
()
override
;
void
prepareShutdown
()
override
;
bool
present
(
DrmBuffer
*
buffer
,
DrmOutput
*
output
);
Outputs
outputs
()
const
override
;
...
...
@@ -110,7 +110,7 @@ private:
void
updateOutputsEnabled
();
QScopedPointer
<
Udev
>
m_udev
;
QScopedPointer
<
UdevMonitor
>
m_udevMonitor
;
// active output pipelines (planes + crtc + encoder + connector)
QVector
<
DrmOutput
*>
m_outputs
;
// active and enabled pipelines (above + wl_output)
...
...
plugins/platforms/drm/drm_gpu.cpp
View file @
2a8395c7
...
...
@@ -47,7 +47,7 @@ DrmGpu::DrmGpu(DrmBackend *backend, QByteArray devNode, int fd, int drmId) : m_b
}
else
{
m_cursorSize
.
setHeight
(
64
);
}
// find out if this GPU is using the NVidia proprietary driver
DrmScopedPointer
<
drmVersion
>
version
(
drmGetVersion
(
fd
));
m_useEglStreams
=
strstr
(
version
->
name
,
"nvidia-drm"
);
...
...
@@ -72,7 +72,7 @@ void DrmGpu::tryAMS()
if
(
drmSetClientCap
(
m_fd
,
DRM_CLIENT_CAP_ATOMIC
,
1
)
==
0
)
{
bool
ams
=
true
;
QVector
<
DrmPlane
*>
planes
,
overlayPlanes
;
DrmScopedPointer
<
drmModePlaneRes
>
planeResources
(
drmModeGetPlaneResources
(
m_fd
));
if
(
!
planeResources
)
{
qCWarning
(
KWIN_DRM
)
<<
"Failed to get plane resources. Falling back to legacy mode on GPU "
<<
m_devNode
;
...
...
@@ -81,7 +81,7 @@ void DrmGpu::tryAMS()
if
(
ams
)
{
qCDebug
(
KWIN_DRM
)
<<
"Using Atomic Mode Setting on gpu"
<<
m_devNode
;
qCDebug
(
KWIN_DRM
)
<<
"Number of planes on GPU"
<<
m_devNode
<<
":"
<<
planeResources
->
count_planes
;
// create the plane objects
for
(
unsigned
int
i
=
0
;
i
<
planeResources
->
count_planes
;
++
i
)
{
DrmScopedPointer
<
drmModePlane
>
kplane
(
drmModeGetPlane
(
m_fd
,
planeResources
->
planes
[
i
]));
...
...
@@ -168,7 +168,7 @@ bool DrmGpu::updateOutputs()
for
(
auto
c
:
qAsConst
(
oldCrtcs
))
{
m_crtcs
.
removeOne
(
c
);
}
QVector
<
DrmOutput
*>
connectedOutputs
;
QVector
<
DrmConnector
*>
pendingConnectors
;
...
...
@@ -197,7 +197,7 @@ bool DrmGpu::updateOutputs()
it
=
m_outputs
.
erase
(
it
);
removedOutputs
.
append
(
removed
);
}
for
(
DrmConnector
*
con
:
qAsConst
(
pendingConnectors
))
{
DrmScopedPointer
<
drmModeConnector
>
connector
(
drmModeGetConnector
(
m_fd
,
con
->
id
()));
if
(
!
connector
)
{
...
...
@@ -218,7 +218,7 @@ bool DrmGpu::updateOutputs()
if
(
!
(
encoder
->
possible_crtcs
&
(
1
<<
crtc
->
resIndex
())))
{
continue
;
}
// check if crtc isn't used yet -- currently we don't allow multiple outputs on one crtc (cloned mode)
auto
it
=
std
::
find_if
(
connectedOutputs
.
constBegin
(),
connectedOutputs
.
constEnd
(),
[
crtc
]
(
DrmOutput
*
o
)
{
...
...
@@ -270,14 +270,14 @@ bool DrmGpu::updateOutputs()
}
std
::
sort
(
connectedOutputs
.
begin
(),
connectedOutputs
.
end
(),
[]
(
DrmOutput
*
a
,
DrmOutput
*
b
)
{
return
a
->
m_conn
->
id
()
<
b
->
m_conn
->
id
();
});
m_outputs
=
connectedOutputs
;
for
(
DrmOutput
*
removedOutput
:
removedOutputs
)
{
emit
outputRemoved
(
removedOutput
);
removedOutput
->
teardown
();
removedOutput
->
m_crtc
=
nullptr
;
removedOutput
->
m_conn
=
nullptr
;
}
qDeleteAll
(
oldConnectors
);
qDeleteAll
(
oldCrtcs
);
return
true
;
...
...
plugins/platforms/drm/drm_gpu.h
View file @
2a8395c7
...
...
@@ -22,50 +22,50 @@ struct gbm_device;
namespace
KWin
{
class
DrmOutput
;
class
DrmPlane
;
class
DrmCrtc
;
class
DrmConnector
;
class
DrmBackend
;
class
AbstractEglBackend
;
class
DrmGpu
:
public
QObject
{
Q_OBJECT
public:
DrmGpu
(
DrmBackend
*
backend
,
QByteArray
devNode
,
int
fd
,
int
drmId
);
~
DrmGpu
();
// getters
QVector
<
DrmOutput
*>
outputs
()
const
{
return
m_outputs
;
}
int
fd
()
const
{
return
m_fd
;
}
int
drmId
()
const
{
return
m_drmId
;
}
bool
atomicModeSetting
()
const
{
return
m_atomicModeSetting
;
}
bool
useEglStreams
()
const
{
return
m_useEglStreams
;
}
bool
deleteBufferAfterPageFlip
()
const
{
return
m_deleteBufferAfterPageFlip
;
}
QByteArray
devNode
()
const
{
return
m_devNode
;
}
gbm_device
*
gbmDevice
()
const
{
return
m_gbmDevice
;
}
...
...
@@ -73,11 +73,11 @@ public:
EGLDisplay
eglDisplay
()
const
{
return
m_eglDisplay
;
}
QVector
<
DrmPlane
*>
planes
()
const
{
return
m_planes
;
}
void
setGbmDevice
(
gbm_device
*
d
)
{
m_gbmDevice
=
d
;
}
...
...
@@ -85,32 +85,32 @@ public:
void
setEglDisplay
(
EGLDisplay
display
)
{
m_eglDisplay
=
display
;
}
void
setDeleteBufferAfterPageFlip
(
bool
deleteBuffer
)
{
m_deleteBufferAfterPageFlip
=
deleteBuffer
;
}
DrmDumbBuffer
*
createBuffer
(
const
QSize
&
size
)
const
{
return
new
DrmDumbBuffer
(
m_fd
,
size
);
}
Q_SIGNALS:
void
outputAdded
(
DrmOutput
*
output
);
void
outputRemoved
(
DrmOutput
*
output
);
void
outputEnabled
(
DrmOutput
*
output
);
void
outputDisabled
(
DrmOutput
*
output
);
protected:
friend
class
DrmBackend
;
void
tryAMS
();
bool
updateOutputs
();
private:
DrmOutput
*
findOutput
(
quint32
connector
);
DrmBackend
*
const
m_backend
;
const
QByteArray
m_devNode
;
QSize
m_cursorSize
;
const
int
m_fd
;
...
...
@@ -120,7 +120,7 @@ private:
bool
m_deleteBufferAfterPageFlip
;
gbm_device
*
m_gbmDevice
;
EGLDisplay
m_eglDisplay
=
EGL_NO_DISPLAY
;
// all available planes: primarys, cursors and overlays
QVector
<
DrmPlane
*>
m_planes
;
QVector
<
DrmPlane
*>
m_overlayPlanes
;
...
...
plugins/platforms/drm/drm_object_connector.h
View file @
2a8395c7
...
...
@@ -32,10 +32,10 @@ public:
QVector
<
uint32_t
>
encoders
()
{
return
m_encoders
;
}
bool
initProps
()
override
;
bool
isConnected
();
bool
isNonDesktop
()
const
{
auto
prop
=
m_props
.
at
(
static_cast
<
int
>
(
PropertyIndex
::
NonDesktop
));
if
(
!
prop
)
{
...
...
plugins/platforms/drm/drm_object_crtc.h
View file @
2a8395c7
...
...
@@ -58,7 +58,7 @@ public:
return
m_gammaRampSize
;
}
bool
setGammaRamp
(
const
GammaRamp
&
gamma
);
DrmGpu
*
gpu
()
{
return
m_gpu
;
}
...
...
plugins/platforms/drm/drm_output.cpp
View file @
2a8395c7
...
...
@@ -809,7 +809,7 @@ bool DrmOutput::presentAtomically(DrmBuffer *buffer)
return
true
;
}
#endif
m_primaryPlane
->
setNext
(
buffer
);
m_nextPlanesFlipList
<<
m_primaryPlane
;
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment