Bug fix #84: Root window not repainted sometimes on wallpaper change
- Fix a bug that root window is not repainted on wallpaper change unless an Expose X event is received. Seemingly, if there's no mapped window on a screen, X will not send an Expose event when the wallpaper changes. Thanks to baskerville for reporting. - Fix a X Pixmap leak when there's no existing wallpaper pixmap found. - Fix a bug in mstrncpy() that null character is not added to the end of the copied string. - Make VSYNC_STRS public, for use in src/dbus.c. Adjust the type of WINTYPES array. Add NUM_VSYNC. - Add more targets for various D-Bus methods. Add "bad_target" D-Bus error. Improve error handling. Add more helper functions to append arguments to a D-Bus message. Add Introspect method to D-Bus introspection reply. - Add public declarations of things in the new condition format code to common.h. Move definitions of some inline functions from compton.h to common.h. Make some functions public. Move wid_get_prop_adv() to compton.c. The primary code files of the new format src/c2.{c,h} will be published when ready. - Add support for dumping version string in Makefile (make version), to make snapshot generation easier. - Add repeated inclusion protection to common.h. - Update documentation. - Use gsed instead of sed in dbus-examples/cdbus-driver.sh if possible, as some BSD systems does not come with GNU sed by default. Thanks to DaChiChang for reporting. - Code clean-up. Small type changes in register_cm() to silence warnings. Quit on failure in parse_vsync(). Apply stricter checks in force_repaint().
This commit is contained in:
35
src/dbus.h
35
src/dbus.h
@ -24,6 +24,8 @@
|
||||
#define CDBUS_ERROR_BADARG_S "Something wrong in arguments?"
|
||||
#define CDBUS_ERROR_BADWIN CDBUS_ERROR_PREFIX ".bad_window"
|
||||
#define CDBUS_ERROR_BADWIN_S "Requested window %#010lx not found."
|
||||
#define CDBUS_ERROR_BADTGT CDBUS_ERROR_PREFIX ".bad_target"
|
||||
#define CDBUS_ERROR_BADTGT_S "Target \"%s\" not found."
|
||||
#define CDBUS_ERROR_FORBIDDEN CDBUS_ERROR_PREFIX ".forbidden"
|
||||
#define CDBUS_ERROR_FORBIDDEN_S "Incorrect password, access denied."
|
||||
|
||||
@ -75,6 +77,15 @@ cdbus_callback_watch_toggled(DBusWatch *watch, void *data);
|
||||
static bool
|
||||
cdbus_apdarg_bool(session_t *ps, DBusMessage *msg, const void *data);
|
||||
|
||||
static bool
|
||||
cdbus_apdarg_int32(session_t *ps, DBusMessage *msg, const void *data);
|
||||
|
||||
static bool
|
||||
cdbus_apdarg_uint32(session_t *ps, DBusMessage *msg, const void *data);
|
||||
|
||||
static bool
|
||||
cdbus_apdarg_double(session_t *ps, DBusMessage *msg, const void *data);
|
||||
|
||||
static bool
|
||||
cdbus_apdarg_wid(session_t *ps, DBusMessage *msg, const void *data);
|
||||
|
||||
@ -145,6 +156,30 @@ cdbus_reply_bool(session_t *ps, DBusMessage *srcmsg, bool bval) {
|
||||
return cdbus_reply(ps, srcmsg, cdbus_apdarg_bool, &bval);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a reply with an int32 argument.
|
||||
*/
|
||||
static inline bool
|
||||
cdbus_reply_int32(session_t *ps, DBusMessage *srcmsg, int32_t val) {
|
||||
return cdbus_reply(ps, srcmsg, cdbus_apdarg_int32, &val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a reply with an uint32 argument.
|
||||
*/
|
||||
static inline bool
|
||||
cdbus_reply_uint32(session_t *ps, DBusMessage *srcmsg, uint32_t val) {
|
||||
return cdbus_reply(ps, srcmsg, cdbus_apdarg_uint32, &val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a reply with a double argument.
|
||||
*/
|
||||
static inline bool
|
||||
cdbus_reply_double(session_t *ps, DBusMessage *srcmsg, double val) {
|
||||
return cdbus_reply(ps, srcmsg, cdbus_apdarg_double, &val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a reply with a wid argument.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user