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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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 *
|
||||
*********************************************/
|
||||
|
||||
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
|
||||
_gdk_x11_events_init_screen (GdkScreen *screen)
|
||||
{
|
||||
@ -158,6 +174,10 @@ _gdk_x11_events_init_screen (GdkScreen *screen)
|
||||
gdk_xsettings_notify_cb,
|
||||
gdk_xsettings_watch_cb,
|
||||
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;
|
||||
}
|
||||
|
||||
@ -2628,7 +2648,6 @@ gdk_xsettings_notify_cb (const char *name,
|
||||
new_event.setting.name = (char *)settings_map[i].gdk_name;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (!new_event.setting.name)
|
||||
return;
|
||||
|
@ -283,8 +283,6 @@ GdkFont *
|
||||
gdk_font_from_description_for_display (GdkDisplay *display,
|
||||
PangoFontDescription *font_desc)
|
||||
{
|
||||
GdkFont *result;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
g_return_val_if_fail (font_desc != NULL, NULL);
|
||||
|
||||
|
@ -38,6 +38,9 @@ struct _XSettingsClient
|
||||
XSettingsWatchFunc watch;
|
||||
void *cb_data;
|
||||
|
||||
XSettingsGrabFunc grab;
|
||||
XSettingsGrabFunc ungrab;
|
||||
|
||||
Window manager_window;
|
||||
Atom manager_atom;
|
||||
Atom selection_atom;
|
||||
@ -410,8 +413,11 @@ check_manager_window (XSettingsClient *client)
|
||||
{
|
||||
if (client->manager_window && client->watch)
|
||||
client->watch (client->manager_window, False, 0, client->cb_data);
|
||||
|
||||
XGrabServer (client->display);
|
||||
|
||||
if (client->grab)
|
||||
client->grab (client->display);
|
||||
else
|
||||
XGrabServer (client->display);
|
||||
|
||||
client->manager_window = XGetSelectionOwner (client->display,
|
||||
client->selection_atom);
|
||||
@ -419,7 +425,11 @@ check_manager_window (XSettingsClient *client)
|
||||
XSelectInput (client->display, client->manager_window,
|
||||
PropertyChangeMask | StructureNotifyMask);
|
||||
|
||||
XUngrabServer (client->display);
|
||||
if (client->ungrab)
|
||||
client->ungrab (client->display);
|
||||
else
|
||||
XUngrabServer (client->display);
|
||||
|
||||
XFlush (client->display);
|
||||
|
||||
if (client->manager_window && client->watch)
|
||||
@ -451,6 +461,8 @@ xsettings_client_new (Display *display,
|
||||
client->notify = notify;
|
||||
client->watch = watch;
|
||||
client->cb_data = cb_data;
|
||||
client->grab = NULL;
|
||||
client->ungrab = NULL;
|
||||
|
||||
client->manager_window = None;
|
||||
client->settings = NULL;
|
||||
@ -479,6 +491,20 @@ xsettings_client_new (Display *display,
|
||||
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
|
||||
xsettings_client_destroy (XSettingsClient *client)
|
||||
{
|
||||
|
@ -47,19 +47,23 @@ typedef void (*XSettingsWatchFunc) (Window window,
|
||||
Bool is_start,
|
||||
long mask,
|
||||
void *cb_data);
|
||||
typedef void (*XSettingsGrabFunc) (Display *display);
|
||||
|
||||
XSettingsClient *xsettings_client_new (Display *display,
|
||||
int screen,
|
||||
XSettingsNotifyFunc notify,
|
||||
XSettingsWatchFunc watch,
|
||||
void *cb_data);
|
||||
void xsettings_client_destroy (XSettingsClient *client);
|
||||
Bool xsettings_client_process_event (XSettingsClient *client,
|
||||
XEvent *xev);
|
||||
|
||||
XSettingsResult xsettings_client_get_setting (XSettingsClient *client,
|
||||
const char *name,
|
||||
XSettingsSetting **setting);
|
||||
XSettingsClient *xsettings_client_new (Display *display,
|
||||
int screen,
|
||||
XSettingsNotifyFunc notify,
|
||||
XSettingsWatchFunc watch,
|
||||
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);
|
||||
Bool xsettings_client_process_event (XSettingsClient *client,
|
||||
XEvent *xev);
|
||||
XSettingsResult xsettings_client_get_setting (XSettingsClient *client,
|
||||
const char *name,
|
||||
XSettingsSetting **setting);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user