Compare commits
	
		
			1 Commits
		
	
	
		
			squeekboar
			...
			minX11rm
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| be7154f287 | 
@ -31,7 +31,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "eekboard/eekboard-context-service.h"
 | 
					#include "eekboard/eekboard-context-service.h"
 | 
				
			||||||
#include "eekboard/eekboard-xklutil.h"
 | 
					#include "eekboard/eekboard-xklutil.h"
 | 
				
			||||||
#include "eek/eek-xkl.h"
 | 
					//#include "eek/eek-xkl.h"      //x11_stub
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define CSW 640
 | 
					#define CSW 640
 | 
				
			||||||
#define CSH 480
 | 
					#define CSH 480
 | 
				
			||||||
@ -173,7 +173,7 @@ eekboard_context_service_real_create_keyboard (EekboardContextService *self,
 | 
				
			|||||||
            display = XOpenDisplay (NULL);
 | 
					            display = XOpenDisplay (NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        error = NULL;
 | 
					        error = NULL;
 | 
				
			||||||
        layout = eek_xkl_layout_new (display, &error);
 | 
					        //layout = eek_xkl_layout_new (display, &error);    //x11_stub
 | 
				
			||||||
        if (layout == NULL) {
 | 
					        if (layout == NULL) {
 | 
				
			||||||
            g_warning ("can't create keyboard %s: %s",
 | 
					            g_warning ("can't create keyboard %s: %s",
 | 
				
			||||||
                       keyboard_type, error->message);
 | 
					                       keyboard_type, error->message);
 | 
				
			||||||
@ -181,10 +181,14 @@ eekboard_context_service_real_create_keyboard (EekboardContextService *self,
 | 
				
			|||||||
            return NULL;
 | 
					            return NULL;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /*
 | 
				
			||||||
 | 
					        //x11_stub
 | 
				
			||||||
        if (!eek_xkl_layout_set_config (EEK_XKL_LAYOUT(layout), rec)) {
 | 
					        if (!eek_xkl_layout_set_config (EEK_XKL_LAYOUT(layout), rec)) {
 | 
				
			||||||
            g_object_unref (layout);
 | 
					            g_object_unref (layout);
 | 
				
			||||||
            return NULL;
 | 
					            return NULL;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        error = NULL;
 | 
					        error = NULL;
 | 
				
			||||||
        layout = eek_xml_layout_new (keyboard_type, &error);
 | 
					        layout = eek_xml_layout_new (keyboard_type, &error);
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										26
									
								
								src/client.c
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								src/client.c
									
									
									
									
									
								
							@ -93,7 +93,7 @@ struct _Client {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#ifdef HAVE_XTEST
 | 
					#ifdef HAVE_XTEST
 | 
				
			||||||
    guint modifier_keycodes[8]; 
 | 
					    guint modifier_keycodes[8]; 
 | 
				
			||||||
    XkbDescRec *xkb;
 | 
					    //XkbDescRec *xkb;  //x11_stub
 | 
				
			||||||
#endif  /* HAVE_XTEST */
 | 
					#endif  /* HAVE_XTEST */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    GSettings *settings;
 | 
					    GSettings *settings;
 | 
				
			||||||
@ -858,6 +858,8 @@ get_replaced_keycode (Client *client)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    guint keycode;
 | 
					    guint keycode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /*
 | 
				
			||||||
 | 
					    //x11_stub_start
 | 
				
			||||||
    for (keycode = client->xkb->max_key_code;
 | 
					    for (keycode = client->xkb->max_key_code;
 | 
				
			||||||
         keycode >= client->xkb->min_key_code;
 | 
					         keycode >= client->xkb->min_key_code;
 | 
				
			||||||
         --keycode) {
 | 
					         --keycode) {
 | 
				
			||||||
@ -867,6 +869,8 @@ get_replaced_keycode (Client *client)
 | 
				
			|||||||
            return keycode;
 | 
					            return keycode;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    //x11_stub_end
 | 
				
			||||||
 | 
					    */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -889,6 +893,8 @@ replace_keycode (Client *client,
 | 
				
			|||||||
    int keysyms_per_keycode;
 | 
					    int keysyms_per_keycode;
 | 
				
			||||||
    KeySym *syms;
 | 
					    KeySym *syms;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /*
 | 
				
			||||||
 | 
					    //x11_stub_start
 | 
				
			||||||
    g_return_val_if_fail (client->xkb->min_key_code <= keycode &&
 | 
					    g_return_val_if_fail (client->xkb->min_key_code <= keycode &&
 | 
				
			||||||
                          keycode <= client->xkb->max_key_code,
 | 
					                          keycode <= client->xkb->max_key_code,
 | 
				
			||||||
                          FALSE);
 | 
					                          FALSE);
 | 
				
			||||||
@ -901,6 +907,8 @@ replace_keycode (Client *client,
 | 
				
			|||||||
    XSync (xdisplay, False);
 | 
					    XSync (xdisplay, False);
 | 
				
			||||||
    XFree (syms);
 | 
					    XFree (syms);
 | 
				
			||||||
    *keysym = old_keysym;
 | 
					    *keysym = old_keysym;
 | 
				
			||||||
 | 
					    //x11_stub_end
 | 
				
			||||||
 | 
					    */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return TRUE;
 | 
					    return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -1017,7 +1025,9 @@ send_fake_key_events (Client    *client,
 | 
				
			|||||||
    if (eek_symbol_is_modifier (symbol))
 | 
					    if (eek_symbol_is_modifier (symbol))
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* If symbol is a text, convert chars in it to keysym */
 | 
					    /*
 | 
				
			||||||
 | 
					    //x11_stub_start
 | 
				
			||||||
 | 
					    // If symbol is a text, convert chars in it to keysym
 | 
				
			||||||
    if (EEK_IS_TEXT(symbol)) {
 | 
					    if (EEK_IS_TEXT(symbol)) {
 | 
				
			||||||
        const gchar *utf8 = eek_text_get_text (EEK_TEXT(symbol));
 | 
					        const gchar *utf8 = eek_text_get_text (EEK_TEXT(symbol));
 | 
				
			||||||
        glong items_written;
 | 
					        glong items_written;
 | 
				
			||||||
@ -1041,6 +1051,8 @@ send_fake_key_events (Client    *client,
 | 
				
			|||||||
        g_free (ucs4);
 | 
					        g_free (ucs4);
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    //x11_stub_end
 | 
				
			||||||
 | 
					    */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (EEK_IS_KEYSYM(symbol)) {
 | 
					    if (EEK_IS_KEYSYM(symbol)) {
 | 
				
			||||||
        guint xkeysym = eek_keysym_get_xkeysym (EEK_KEYSYM(symbol));
 | 
					        guint xkeysym = eek_keysym_get_xkeysym (EEK_KEYSYM(symbol));
 | 
				
			||||||
@ -1131,9 +1143,13 @@ client_enable_xtest (Client *client)
 | 
				
			|||||||
        return FALSE;
 | 
					        return FALSE;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /*
 | 
				
			||||||
 | 
					    //x11_stub_start
 | 
				
			||||||
    if (!client->xkb)
 | 
					    if (!client->xkb)
 | 
				
			||||||
        client->xkb = XkbGetMap (xdisplay, XkbKeySymsMask, XkbUseCoreKbd);
 | 
					        client->xkb = XkbGetMap (xdisplay, XkbKeySymsMask, XkbUseCoreKbd);
 | 
				
			||||||
    g_assert (client->xkb);
 | 
					    g_assert (client->xkb);
 | 
				
			||||||
 | 
					    //x11_stub_end
 | 
				
			||||||
 | 
					    */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    update_modifier_keycodes (client);
 | 
					    update_modifier_keycodes (client);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1147,9 +1163,13 @@ client_enable_xtest (Client *client)
 | 
				
			|||||||
void
 | 
					void
 | 
				
			||||||
client_disable_xtest (Client *client)
 | 
					client_disable_xtest (Client *client)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    /*
 | 
				
			||||||
 | 
					    //x11_stub_start
 | 
				
			||||||
    if (client->xkb) {
 | 
					    if (client->xkb) {
 | 
				
			||||||
        XkbFreeKeyboard (client->xkb, 0, TRUE);	/* free_all = TRUE */
 | 
					        XkbFreeKeyboard (client->xkb, 0, TRUE);	// free_all = TRUE 
 | 
				
			||||||
        client->xkb = NULL;
 | 
					        client->xkb = NULL;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    //x11_stub+end
 | 
				
			||||||
 | 
					    */
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif  /* HAVE_XTEST */
 | 
					#endif  /* HAVE_XTEST */
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user