mark parameters const
This commit is contained in:
@ -296,7 +296,7 @@ bool floating_maybe_reassign_ws(Con *con) {
|
||||
}
|
||||
|
||||
DRAGGING_CB(drag_window_callback) {
|
||||
struct xcb_button_press_event_t *event = extra;
|
||||
const struct xcb_button_press_event_t *event = extra;
|
||||
|
||||
/* Reposition the client correctly while moving */
|
||||
con->rect.x = old_rect->x + (new_x - event->root_x);
|
||||
@ -317,7 +317,7 @@ DRAGGING_CB(drag_window_callback) {
|
||||
* Calls the drag_pointer function with the drag_window callback
|
||||
*
|
||||
*/
|
||||
void floating_drag_window(Con *con, xcb_button_press_event_t *event) {
|
||||
void floating_drag_window(Con *con, const xcb_button_press_event_t *event) {
|
||||
DLOG("floating_drag_window\n");
|
||||
|
||||
/* Push changes before dragging, so that the window gets raised now and not
|
||||
@ -337,14 +337,14 @@ void floating_drag_window(Con *con, xcb_button_press_event_t *event) {
|
||||
*
|
||||
*/
|
||||
struct resize_window_callback_params {
|
||||
border_t corner;
|
||||
bool proportional;
|
||||
xcb_button_press_event_t *event;
|
||||
const border_t corner;
|
||||
const bool proportional;
|
||||
const xcb_button_press_event_t *event;
|
||||
};
|
||||
|
||||
DRAGGING_CB(resize_window_callback) {
|
||||
struct resize_window_callback_params *params = extra;
|
||||
xcb_button_press_event_t *event = params->event;
|
||||
const struct resize_window_callback_params *params = extra;
|
||||
const xcb_button_press_event_t *event = params->event;
|
||||
border_t corner = params->corner;
|
||||
|
||||
int32_t dest_x = con->rect.x;
|
||||
@ -397,8 +397,8 @@ DRAGGING_CB(resize_window_callback) {
|
||||
* Calls the drag_pointer function with the resize_window callback
|
||||
*
|
||||
*/
|
||||
void floating_resize_window(Con *con, bool proportional,
|
||||
xcb_button_press_event_t *event) {
|
||||
void floating_resize_window(Con *con, const bool proportional,
|
||||
const xcb_button_press_event_t *event) {
|
||||
DLOG("floating_resize_window\n");
|
||||
|
||||
/* corner saves the nearest corner to the original click. It contains
|
||||
@ -426,8 +426,8 @@ void floating_resize_window(Con *con, bool proportional,
|
||||
* the event and the new coordinates (x, y).
|
||||
*
|
||||
*/
|
||||
void drag_pointer(Con *con, xcb_button_press_event_t *event, xcb_window_t
|
||||
confine_to, border_t border, callback_t callback, void *extra)
|
||||
void drag_pointer(Con *con, const xcb_button_press_event_t *event, xcb_window_t
|
||||
confine_to, border_t border, callback_t callback, const void *extra)
|
||||
{
|
||||
uint32_t new_x, new_y;
|
||||
Rect old_rect;
|
||||
|
Reference in New Issue
Block a user