Remove unused variable 'result'
Mon Feb 2 18:45:28 2004 Soeren Sandmann <sandmann@daimi.au.dk> * gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display): Remove unused variable 'result' * gdk/x11/xsettings-client.[ch]: Add new set_grab/ungrab_func() functions. * gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them here
This commit is contained in:

committed by
Søren Sandmann Pedersen

parent
c45038472a
commit
ff364586da
@ -1,3 +1,12 @@
|
|||||||
|
Mon Feb 2 18:45:28 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
|
* gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display):
|
||||||
|
Remove unused variable 'result'
|
||||||
|
|
||||||
|
* gdk/x11/xsettings-client.[ch]: Add new set_grab/ungrab_func() functions.
|
||||||
|
|
||||||
|
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them here
|
||||||
|
|
||||||
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||||
|
|
||||||
* configure.in po/uz*.po: changed default for Uzbek; now just "uz"
|
* configure.in po/uz*.po: changed default for Uzbek; now just "uz"
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Mon Feb 2 18:45:28 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
|
* gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display):
|
||||||
|
Remove unused variable 'result'
|
||||||
|
|
||||||
|
* gdk/x11/xsettings-client.[ch]: Add new set_grab/ungrab_func() functions.
|
||||||
|
|
||||||
|
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them here
|
||||||
|
|
||||||
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||||
|
|
||||||
* configure.in po/uz*.po: changed default for Uzbek; now just "uz"
|
* configure.in po/uz*.po: changed default for Uzbek; now just "uz"
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Mon Feb 2 18:45:28 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
|
* gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display):
|
||||||
|
Remove unused variable 'result'
|
||||||
|
|
||||||
|
* gdk/x11/xsettings-client.[ch]: Add new set_grab/ungrab_func() functions.
|
||||||
|
|
||||||
|
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them here
|
||||||
|
|
||||||
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||||
|
|
||||||
* configure.in po/uz*.po: changed default for Uzbek; now just "uz"
|
* configure.in po/uz*.po: changed default for Uzbek; now just "uz"
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Mon Feb 2 18:45:28 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
|
* gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display):
|
||||||
|
Remove unused variable 'result'
|
||||||
|
|
||||||
|
* gdk/x11/xsettings-client.[ch]: Add new set_grab/ungrab_func() functions.
|
||||||
|
|
||||||
|
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them here
|
||||||
|
|
||||||
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||||
|
|
||||||
* configure.in po/uz*.po: changed default for Uzbek; now just "uz"
|
* configure.in po/uz*.po: changed default for Uzbek; now just "uz"
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
Mon Feb 2 18:45:28 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
|
* gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display):
|
||||||
|
Remove unused variable 'result'
|
||||||
|
|
||||||
|
* gdk/x11/xsettings-client.[ch]: Add new set_grab/ungrab_func() functions.
|
||||||
|
|
||||||
|
* gdk/x11/gdkevents-x11.c (_gdk_x11_events_init_screen): Use them here
|
||||||
|
|
||||||
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
Mon Feb 2 14:32:32 2004 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||||
|
|
||||||
* configure.in po/uz*.po: changed default for Uzbek; now just "uz"
|
* configure.in po/uz*.po: changed default for Uzbek; now just "uz"
|
||||||
|
@ -145,6 +145,22 @@ gdk_check_xpending (GdkDisplay *display)
|
|||||||
* Functions for maintaining the event queue *
|
* Functions for maintaining the event queue *
|
||||||
*********************************************/
|
*********************************************/
|
||||||
|
|
||||||
|
static void
|
||||||
|
refcounted_grab_server (Display *xdisplay)
|
||||||
|
{
|
||||||
|
GdkDisplay *display = gdk_x11_lookup_xdisplay (xdisplay);
|
||||||
|
|
||||||
|
gdk_x11_display_grab (display);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
refcounted_ungrab_server (Display *xdisplay)
|
||||||
|
{
|
||||||
|
GdkDisplay *display = gdk_x11_lookup_xdisplay (xdisplay);
|
||||||
|
|
||||||
|
gdk_x11_display_ungrab (display);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_gdk_x11_events_init_screen (GdkScreen *screen)
|
_gdk_x11_events_init_screen (GdkScreen *screen)
|
||||||
{
|
{
|
||||||
@ -158,6 +174,10 @@ _gdk_x11_events_init_screen (GdkScreen *screen)
|
|||||||
gdk_xsettings_notify_cb,
|
gdk_xsettings_notify_cb,
|
||||||
gdk_xsettings_watch_cb,
|
gdk_xsettings_watch_cb,
|
||||||
screen);
|
screen);
|
||||||
|
xsettings_client_set_grab_func (screen_x11->xsettings_client,
|
||||||
|
refcounted_grab_server);
|
||||||
|
xsettings_client_set_ungrab_func (screen_x11->xsettings_client,
|
||||||
|
refcounted_ungrab_server);
|
||||||
screen_x11->xsettings_in_init = FALSE;
|
screen_x11->xsettings_in_init = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2629,7 +2649,6 @@ gdk_xsettings_notify_cb (const char *name,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!new_event.setting.name)
|
if (!new_event.setting.name)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -283,8 +283,6 @@ GdkFont *
|
|||||||
gdk_font_from_description_for_display (GdkDisplay *display,
|
gdk_font_from_description_for_display (GdkDisplay *display,
|
||||||
PangoFontDescription *font_desc)
|
PangoFontDescription *font_desc)
|
||||||
{
|
{
|
||||||
GdkFont *result;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||||
g_return_val_if_fail (font_desc != NULL, NULL);
|
g_return_val_if_fail (font_desc != NULL, NULL);
|
||||||
|
|
||||||
|
@ -38,6 +38,9 @@ struct _XSettingsClient
|
|||||||
XSettingsWatchFunc watch;
|
XSettingsWatchFunc watch;
|
||||||
void *cb_data;
|
void *cb_data;
|
||||||
|
|
||||||
|
XSettingsGrabFunc grab;
|
||||||
|
XSettingsGrabFunc ungrab;
|
||||||
|
|
||||||
Window manager_window;
|
Window manager_window;
|
||||||
Atom manager_atom;
|
Atom manager_atom;
|
||||||
Atom selection_atom;
|
Atom selection_atom;
|
||||||
@ -411,6 +414,9 @@ check_manager_window (XSettingsClient *client)
|
|||||||
if (client->manager_window && client->watch)
|
if (client->manager_window && client->watch)
|
||||||
client->watch (client->manager_window, False, 0, client->cb_data);
|
client->watch (client->manager_window, False, 0, client->cb_data);
|
||||||
|
|
||||||
|
if (client->grab)
|
||||||
|
client->grab (client->display);
|
||||||
|
else
|
||||||
XGrabServer (client->display);
|
XGrabServer (client->display);
|
||||||
|
|
||||||
client->manager_window = XGetSelectionOwner (client->display,
|
client->manager_window = XGetSelectionOwner (client->display,
|
||||||
@ -419,7 +425,11 @@ check_manager_window (XSettingsClient *client)
|
|||||||
XSelectInput (client->display, client->manager_window,
|
XSelectInput (client->display, client->manager_window,
|
||||||
PropertyChangeMask | StructureNotifyMask);
|
PropertyChangeMask | StructureNotifyMask);
|
||||||
|
|
||||||
|
if (client->ungrab)
|
||||||
|
client->ungrab (client->display);
|
||||||
|
else
|
||||||
XUngrabServer (client->display);
|
XUngrabServer (client->display);
|
||||||
|
|
||||||
XFlush (client->display);
|
XFlush (client->display);
|
||||||
|
|
||||||
if (client->manager_window && client->watch)
|
if (client->manager_window && client->watch)
|
||||||
@ -451,6 +461,8 @@ xsettings_client_new (Display *display,
|
|||||||
client->notify = notify;
|
client->notify = notify;
|
||||||
client->watch = watch;
|
client->watch = watch;
|
||||||
client->cb_data = cb_data;
|
client->cb_data = cb_data;
|
||||||
|
client->grab = NULL;
|
||||||
|
client->ungrab = NULL;
|
||||||
|
|
||||||
client->manager_window = None;
|
client->manager_window = None;
|
||||||
client->settings = NULL;
|
client->settings = NULL;
|
||||||
@ -479,6 +491,20 @@ xsettings_client_new (Display *display,
|
|||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
xsettings_client_set_grab_func (XSettingsClient *client,
|
||||||
|
XSettingsGrabFunc grab)
|
||||||
|
{
|
||||||
|
client->grab = grab;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
xsettings_client_set_ungrab_func (XSettingsClient *client,
|
||||||
|
XSettingsGrabFunc ungrab)
|
||||||
|
{
|
||||||
|
client->ungrab = ungrab;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
xsettings_client_destroy (XSettingsClient *client)
|
xsettings_client_destroy (XSettingsClient *client)
|
||||||
{
|
{
|
||||||
|
@ -47,16 +47,20 @@ typedef void (*XSettingsWatchFunc) (Window window,
|
|||||||
Bool is_start,
|
Bool is_start,
|
||||||
long mask,
|
long mask,
|
||||||
void *cb_data);
|
void *cb_data);
|
||||||
|
typedef void (*XSettingsGrabFunc) (Display *display);
|
||||||
|
|
||||||
XSettingsClient *xsettings_client_new (Display *display,
|
XSettingsClient *xsettings_client_new (Display *display,
|
||||||
int screen,
|
int screen,
|
||||||
XSettingsNotifyFunc notify,
|
XSettingsNotifyFunc notify,
|
||||||
XSettingsWatchFunc watch,
|
XSettingsWatchFunc watch,
|
||||||
void *cb_data);
|
void *cb_data);
|
||||||
|
void xsettings_client_set_grab_func (XSettingsClient *client,
|
||||||
|
XSettingsGrabFunc grab);
|
||||||
|
void xsettings_client_set_ungrab_func (XSettingsClient *client,
|
||||||
|
XSettingsGrabFunc ungrab);
|
||||||
void xsettings_client_destroy (XSettingsClient *client);
|
void xsettings_client_destroy (XSettingsClient *client);
|
||||||
Bool xsettings_client_process_event (XSettingsClient *client,
|
Bool xsettings_client_process_event (XSettingsClient *client,
|
||||||
XEvent *xev);
|
XEvent *xev);
|
||||||
|
|
||||||
XSettingsResult xsettings_client_get_setting (XSettingsClient *client,
|
XSettingsResult xsettings_client_get_setting (XSettingsClient *client,
|
||||||
const char *name,
|
const char *name,
|
||||||
XSettingsSetting **setting);
|
XSettingsSetting **setting);
|
||||||
|
Reference in New Issue
Block a user