mirror of https://github.com/davatorium/rofi.git
Run indenter
This commit is contained in:
parent
6fb94876ca
commit
a4fd907fe8
|
@ -207,7 +207,6 @@ static void x11_cache_free ( void )
|
|||
*/
|
||||
static xcb_get_window_attributes_reply_t * window_get_attributes ( xcb_connection_t *xcb_connection, xcb_window_t w )
|
||||
{
|
||||
|
||||
xcb_get_window_attributes_cookie_t c = xcb_get_window_attributes ( xcb_connection, w );
|
||||
xcb_get_window_attributes_reply_t *r = xcb_get_window_attributes_reply ( xcb_connection, c, NULL );
|
||||
if ( r ) {
|
||||
|
@ -261,7 +260,6 @@ static client* window_client ( xcb_connection_t *xcb_connection, xcb_window_t wi
|
|||
// copy xattr so we don't have to care when stuff is freed
|
||||
memmove ( &c->xattr, attr, sizeof ( xcb_get_window_attributes_reply_t ) );
|
||||
|
||||
|
||||
xcb_get_property_cookie_t cky = xcb_ewmh_get_wm_state ( &xcb_ewmh, win );
|
||||
xcb_ewmh_get_atoms_reply_t states;
|
||||
if ( xcb_ewmh_get_wm_state_reply ( &xcb_ewmh, cky, &states, NULL ) ) {
|
||||
|
@ -469,7 +467,9 @@ static void _window_mode_load_data ( Mode *sw, unsigned int cd )
|
|||
xcb_get_property_cookie_t cookie;
|
||||
xcb_get_property_reply_t *r;
|
||||
|
||||
cookie = xcb_get_property(xcb_connection, 0, c->window, xcb_ewmh._NET_WM_DESKTOP, XCB_GET_PROPERTY, 0, sizeof(unsigned int));
|
||||
cookie =
|
||||
xcb_get_property ( xcb_connection, 0, c->window, xcb_ewmh._NET_WM_DESKTOP, XCB_GET_PROPERTY, 0,
|
||||
sizeof ( unsigned int ) );
|
||||
r = xcb_get_property_reply ( xcb_connection, cookie, NULL );
|
||||
if ( r && r->type == XCB_ATOM_INTEGER ) {
|
||||
wmdesktop = *( (int *) xcb_get_property_value ( r ) );
|
||||
|
|
|
@ -473,7 +473,6 @@ static gboolean main_loop_x11_event_handler ( xcb_generic_event_t *ev, G_GNUC_UN
|
|||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
|
||||
static gboolean main_loop_signal_handler_int ( G_GNUC_UNUSED gpointer data )
|
||||
{
|
||||
// Break out of loop.
|
||||
|
@ -641,7 +640,6 @@ int main ( int argc, char *argv[] )
|
|||
fprintf ( stderr, "Failed to create EWMH atoms\n" );
|
||||
}
|
||||
|
||||
|
||||
if ( xkb_x11_setup_xkb_extension ( xcb_connection, XKB_X11_MIN_MAJOR_XKB_VERSION, XKB_X11_MIN_MINOR_XKB_VERSION,
|
||||
XKB_X11_SETUP_XKB_EXTENSION_NO_FLAGS, NULL, NULL, &xkb.first_event, NULL ) < 0 ) {
|
||||
fprintf ( stderr, "cannot setup XKB extension!\n" );
|
||||
|
|
|
@ -388,7 +388,8 @@ void rofi_view_itterrate ( RofiViewState *state, xcb_generic_event_t *event, xkb
|
|||
}
|
||||
}
|
||||
}
|
||||
else{ switch ( type )
|
||||
else{
|
||||
switch ( type )
|
||||
{
|
||||
case XCB_EXPOSE:
|
||||
state->update = TRUE;
|
||||
|
@ -996,7 +997,8 @@ static void rofi_view_paste ( RofiViewState *state, xcb_selection_notify_event_t
|
|||
{
|
||||
if ( xse->property == XCB_ATOM_NONE ) {
|
||||
fprintf ( stderr, "Failed to convert selection\n" );
|
||||
} else if ( xse->property == xcb_ewmh.UTF8_STRING ) {
|
||||
}
|
||||
else if ( xse->property == xcb_ewmh.UTF8_STRING ) {
|
||||
gchar *text = window_get_text_prop ( xcb_connection, main_window, xcb_ewmh.UTF8_STRING );
|
||||
if ( text != NULL && text[0] != '\0' ) {
|
||||
unsigned int dl = strlen ( text );
|
||||
|
@ -1013,7 +1015,8 @@ static void rofi_view_paste ( RofiViewState *state, xcb_selection_notify_event_t
|
|||
state->refilter = TRUE;
|
||||
}
|
||||
g_free ( text );
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
fprintf ( stderr, "Failed\n" );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -256,7 +256,8 @@ void monitor_active ( xcb_connection_t *xcb_connection, workarea *mon )
|
|||
// Get the current desktop.
|
||||
unsigned int current_desktop = 0;
|
||||
if ( config.monitor != -2 && xcb_ewmh_get_current_desktop_reply ( &xcb_ewmh,
|
||||
xcb_ewmh_get_current_desktop( &xcb_ewmh, xcb_screen_nbr), ¤t_desktop, NULL )) {
|
||||
xcb_ewmh_get_current_desktop ( &xcb_ewmh, xcb_screen_nbr ),
|
||||
¤t_desktop, NULL ) ) {
|
||||
xcb_get_property_cookie_t c = xcb_ewmh_get_desktop_viewport ( &xcb_ewmh, xcb_screen_nbr );
|
||||
xcb_ewmh_get_desktop_viewport_reply_t vp;
|
||||
if ( xcb_ewmh_get_desktop_viewport_reply ( &xcb_ewmh, c, &vp, NULL ) ) {
|
||||
|
@ -312,7 +313,6 @@ void monitor_active ( xcb_connection_t *xcb_connection, workarea *mon )
|
|||
|
||||
int take_keyboard ( xcb_connection_t *xcb_connection, xcb_window_t w )
|
||||
{
|
||||
|
||||
for ( int i = 0; i < 500; i++ ) {
|
||||
xcb_grab_keyboard_cookie_t cc = xcb_grab_keyboard ( xcb_connection,
|
||||
1, w, XCB_CURRENT_TIME, XCB_GRAB_MODE_ASYNC,
|
||||
|
@ -485,7 +485,6 @@ static void x11_create_frequently_used_atoms ( xcb_connection_t *xcb_connection
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void x11_setup ( xcb_connection_t *xcb_connection, xkb_stuff *xkb )
|
||||
{
|
||||
// determine numlock mask so we can bind on keys with and without it
|
||||
|
|
|
@ -26,7 +26,6 @@ void rofi_view_queue_redraw ()
|
|||
}
|
||||
Color color_get ( const char *name )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void rofi_view_error_dialog ( const char *msg, G_GNUC_UNUSED int markup )
|
||||
|
@ -129,5 +128,4 @@ int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv )
|
|||
|
||||
textbox_free ( box );
|
||||
textbox_cleanup ( );
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue