Changeset View
Changeset View
Standalone View
Standalone View
kdecoration/breezesizegrip.cpp
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Line(s) | 42 | { | |||
---|---|---|---|---|---|
70 | connect( c, &KDecoration2::DecoratedClient::activeChanged, this, &SizeGrip::updateActiveState ); | 70 | connect( c, &KDecoration2::DecoratedClient::activeChanged, this, &SizeGrip::updateActiveState ); | ||
71 | 71 | | |||
72 | // show | 72 | // show | ||
73 | show(); | 73 | show(); | ||
74 | 74 | | |||
75 | } | 75 | } | ||
76 | 76 | | |||
77 | //_____________________________________________ | 77 | //_____________________________________________ | ||
78 | SizeGrip::~SizeGrip( void ) | 78 | SizeGrip::~SizeGrip() | ||
79 | {} | 79 | {} | ||
80 | 80 | | |||
81 | //_____________________________________________ | 81 | //_____________________________________________ | ||
82 | void SizeGrip::updateActiveState( void ) | 82 | void SizeGrip::updateActiveState() | ||
83 | { | 83 | { | ||
84 | #if BREEZE_HAVE_X11 | 84 | #if BREEZE_HAVE_X11 | ||
85 | if( QX11Info::isPlatformX11() ) | 85 | if( QX11Info::isPlatformX11() ) | ||
86 | { | 86 | { | ||
87 | const quint32 value = XCB_STACK_MODE_ABOVE; | 87 | const quint32 value = XCB_STACK_MODE_ABOVE; | ||
88 | xcb_configure_window( QX11Info::connection(), winId(), XCB_CONFIG_WINDOW_STACK_MODE, &value ); | 88 | xcb_configure_window( QX11Info::connection(), winId(), XCB_CONFIG_WINDOW_STACK_MODE, &value ); | ||
89 | xcb_map_window( QX11Info::connection(), winId() ); | 89 | xcb_map_window( QX11Info::connection(), winId() ); | ||
90 | } | 90 | } | ||
91 | #endif | 91 | #endif | ||
92 | 92 | | |||
93 | update(); | 93 | update(); | ||
94 | 94 | | |||
95 | } | 95 | } | ||
96 | 96 | | |||
97 | //_____________________________________________ | 97 | //_____________________________________________ | ||
98 | void SizeGrip::embed( void ) | 98 | void SizeGrip::embed() | ||
99 | { | 99 | { | ||
100 | 100 | | |||
101 | #if BREEZE_HAVE_X11 | 101 | #if BREEZE_HAVE_X11 | ||
102 | 102 | | |||
103 | if( !QX11Info::isPlatformX11() ) return; | 103 | if( !QX11Info::isPlatformX11() ) return; | ||
104 | auto c = m_decoration.data()->client().data(); | 104 | auto c = m_decoration.data()->client().data(); | ||
105 | 105 | | |||
106 | xcb_window_t windowId = c->windowId(); | 106 | xcb_window_t windowId = c->windowId(); | ||
▲ Show 20 Lines • Show All 78 Lines • ▼ Show 20 Line(s) | 161 | { | |||
185 | 185 | | |||
186 | } | 186 | } | ||
187 | 187 | | |||
188 | return; | 188 | return; | ||
189 | 189 | | |||
190 | } | 190 | } | ||
191 | 191 | | |||
192 | //_______________________________________________________________________________ | 192 | //_______________________________________________________________________________ | ||
193 | void SizeGrip::updatePosition( void ) | 193 | void SizeGrip::updatePosition() | ||
194 | { | 194 | { | ||
195 | 195 | | |||
196 | #if BREEZE_HAVE_X11 | 196 | #if BREEZE_HAVE_X11 | ||
197 | if( !QX11Info::isPlatformX11() ) return; | 197 | if( !QX11Info::isPlatformX11() ) return; | ||
198 | 198 | | |||
199 | auto c = m_decoration.data()->client().data(); | 199 | auto c = m_decoration.data()->client().data(); | ||
200 | QPoint position( | 200 | QPoint position( | ||
201 | c->width() - GripSize - Offset, | 201 | c->width() - GripSize - Offset, | ||
▲ Show 20 Lines • Show All 107 Lines • Show Last 20 Lines |