summaryrefslogtreecommitdiffstats
path: root/source/dialogs
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-05-06 12:40:28 +0200
committerDave Davenport <qball@gmpclient.org>2016-05-06 12:40:55 +0200
commit8e05106c87b8d1553a39e6f663cc6226211ef8be (patch)
tree99ff95cccd1cca7c0c74f526bef375754268068f /source/dialogs
parentea3b5a39ca2c1ff6cb469d474f1a8922bfc8cb74 (diff)
Add option to view background image instead of screenshot in fake transparency. Issue #390
Diffstat (limited to 'source/dialogs')
-rw-r--r--source/dialogs/window.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/source/dialogs/window.c b/source/dialogs/window.c
index 13a43dee..5b2fd249 100644
--- a/source/dialogs/window.c
+++ b/source/dialogs/window.c
@@ -470,7 +470,7 @@ static void _window_mode_load_data ( Mode *sw, unsigned int cd )
( ( c->title != NULL ) ? strlen ( c->title ) : 0 ) + ( c->class ? strlen ( c->class ) : 0 ) + classfield + 50;
char *line = g_malloc ( len );
if ( !pd->config_i3_mode ) {
- uint32_t wmdesktop = 0;
+ uint32_t wmdesktop = 0;
// find client's desktop.
xcb_get_property_cookie_t cookie;
xcb_get_property_reply_t *r;
@@ -482,7 +482,7 @@ static void _window_mode_load_data ( Mode *sw, unsigned int cd )
if ( r && r->type == XCB_ATOM_CARDINAL ) {
wmdesktop = *( (uint32_t *) xcb_get_property_value ( r ) );
}
- if ( r && r->type != XCB_ATOM_CARDINAL) {
+ if ( r && r->type != XCB_ATOM_CARDINAL ) {
// Assume the client is on all desktops.
wmdesktop = 0xFFFFFFFF;
}
@@ -544,31 +544,32 @@ static ModeMode window_mode_result ( Mode *sw, int mretv, G_GNUC_UNUSED char **i
if ( rmpd->config_i3_mode ) {
// Hack for i3.
i3_support_focus_window ( rmpd->ids->array[selected_line] );
- } else {
+ }
+ else {
// Get the current desktop.
- unsigned int current_desktop = 0;
- xcb_get_property_cookie_t c = xcb_ewmh_get_current_desktop ( &xcb->ewmh, xcb->screen_nbr );
+ unsigned int current_desktop = 0;
+ xcb_get_property_cookie_t c = xcb_ewmh_get_current_desktop ( &xcb->ewmh, xcb->screen_nbr );
if ( !xcb_ewmh_get_current_desktop_reply ( &xcb->ewmh, c, &current_desktop, NULL ) ) {
current_desktop = 0;
}
// Get the desktop of the client to switch to
- uint32_t wmdesktop = 0;
+ uint32_t wmdesktop = 0;
xcb_get_property_cookie_t cookie;
xcb_get_property_reply_t *r;
- cookie = xcb_get_property (xcb->connection,
- 0,
- rmpd->ids->array[selected_line],
- xcb->ewmh._NET_WM_DESKTOP,
- XCB_ATOM_CARDINAL,
- 0,
- 1);
+ cookie = xcb_get_property ( xcb->connection,
+ 0,
+ rmpd->ids->array[selected_line],
+ xcb->ewmh._NET_WM_DESKTOP,
+ XCB_ATOM_CARDINAL,
+ 0,
+ 1 );
r = xcb_get_property_reply ( xcb->connection, cookie, NULL );
if ( r && r->type == XCB_ATOM_CARDINAL ) {
wmdesktop = *( (uint32_t *) xcb_get_property_value ( r ) );
}
- if ( r && r->type != XCB_ATOM_CARDINAL) {
+ if ( r && r->type != XCB_ATOM_CARDINAL ) {
// Assume the client is on all desktops.
wmdesktop = current_desktop;
}
@@ -576,10 +577,10 @@ static ModeMode window_mode_result ( Mode *sw, int mretv, G_GNUC_UNUSED char **i
// If we have to switch the desktop, do
if ( wmdesktop != current_desktop ) {
- xcb_ewmh_request_change_current_desktop(&xcb->ewmh,
- xcb->screen_nbr,
- wmdesktop,
- XCB_CURRENT_TIME);
+ xcb_ewmh_request_change_current_desktop ( &xcb->ewmh,
+ xcb->screen_nbr,
+ wmdesktop,
+ XCB_CURRENT_TIME );
}
// Activate the window