aboutsummaryrefslogtreecommitdiffstats
path: root/sway/config
diff options
context:
space:
mode:
authorLibravatar Dominique Martinet <asmadeus@codewreck.org>2018-01-05 22:32:51 +0100
committerLibravatar Dominique Martinet <asmadeus@codewreck.org>2018-01-05 23:39:46 +0100
commit67985e903188a464e602d04f9ed218bd397f5ab1 (patch)
tree3589175749c9a2ed746b0cc280ab3ccfb33125e9 /sway/config
parentMerge pull request #1554 from martinetd/cmd_set (diff)
downloadsway-67985e903188a464e602d04f9ed218bd397f5ab1.tar.gz
sway-67985e903188a464e602d04f9ed218bd397f5ab1.tar.zst
sway-67985e903188a464e602d04f9ed218bd397f5ab1.zip
sway: change all sway_log to wlr_log
Diffstat (limited to 'sway/config')
-rw-r--r--sway/config/input.c6
-rw-r--r--sway/config/output.c16
-rw-r--r--sway/config/seat.c6
3 files changed, 14 insertions, 14 deletions
diff --git a/sway/config/input.c b/sway/config/input.c
index 6f8d31f7..96181302 100644
--- a/sway/config/input.c
+++ b/sway/config/input.c
@@ -8,13 +8,13 @@
8struct input_config *new_input_config(const char* identifier) { 8struct input_config *new_input_config(const char* identifier) {
9 struct input_config *input = calloc(1, sizeof(struct input_config)); 9 struct input_config *input = calloc(1, sizeof(struct input_config));
10 if (!input) { 10 if (!input) {
11 sway_log(L_DEBUG, "Unable to allocate input config"); 11 wlr_log(L_DEBUG, "Unable to allocate input config");
12 return NULL; 12 return NULL;
13 } 13 }
14 sway_log(L_DEBUG, "new_input_config(%s)", identifier); 14 wlr_log(L_DEBUG, "new_input_config(%s)", identifier);
15 if (!(input->identifier = strdup(identifier))) { 15 if (!(input->identifier = strdup(identifier))) {
16 free(input); 16 free(input);
17 sway_log(L_DEBUG, "Unable to allocate input config"); 17 wlr_log(L_DEBUG, "Unable to allocate input config");
18 return NULL; 18 return NULL;
19 } 19 }
20 20
diff --git a/sway/config/output.c b/sway/config/output.c
index e798a20e..69e883f1 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -84,7 +84,7 @@ static void set_mode(struct wlr_output *output, int width, int height,
84 float refresh_rate) { 84 float refresh_rate) {
85 int mhz = (int)(refresh_rate * 1000); 85 int mhz = (int)(refresh_rate * 1000);
86 if (wl_list_empty(&output->modes)) { 86 if (wl_list_empty(&output->modes)) {
87 sway_log(L_DEBUG, "Assigning custom mode to %s", output->name); 87 wlr_log(L_DEBUG, "Assigning custom mode to %s", output->name);
88 wlr_output_set_custom_mode(output, width, height, mhz); 88 wlr_output_set_custom_mode(output, width, height, mhz);
89 return; 89 return;
90 } 90 }
@@ -100,9 +100,9 @@ static void set_mode(struct wlr_output *output, int width, int height,
100 } 100 }
101 } 101 }
102 if (!best) { 102 if (!best) {
103 sway_log(L_ERROR, "Configured mode for %s not available", output->name); 103 wlr_log(L_ERROR, "Configured mode for %s not available", output->name);
104 } else { 104 } else {
105 sway_log(L_DEBUG, "Assigning configured mode to %s", output->name); 105 wlr_log(L_DEBUG, "Assigning configured mode to %s", output->name);
106 wlr_output_set_mode(output, best); 106 wlr_output_set_mode(output, best);
107 } 107 }
108} 108}
@@ -119,22 +119,22 @@ void apply_output_config(struct output_config *oc, swayc_t *output) {
119 } 119 }
120 120
121 if (oc && oc->width > 0 && oc->height > 0) { 121 if (oc && oc->width > 0 && oc->height > 0) {
122 sway_log(L_DEBUG, "Set %s mode to %dx%d (%f GHz)", oc->name, oc->width, 122 wlr_log(L_DEBUG, "Set %s mode to %dx%d (%f GHz)", oc->name, oc->width,
123 oc->height, oc->refresh_rate); 123 oc->height, oc->refresh_rate);
124 set_mode(wlr_output, oc->width, oc->height, oc->refresh_rate); 124 set_mode(wlr_output, oc->width, oc->height, oc->refresh_rate);
125 } 125 }
126 if (oc && oc->scale > 0) { 126 if (oc && oc->scale > 0) {
127 sway_log(L_DEBUG, "Set %s scale to %f", oc->name, oc->scale); 127 wlr_log(L_DEBUG, "Set %s scale to %f", oc->name, oc->scale);
128 wlr_output_set_scale(wlr_output, oc->scale); 128 wlr_output_set_scale(wlr_output, oc->scale);
129 } 129 }
130 if (oc && oc->transform >= 0) { 130 if (oc && oc->transform >= 0) {
131 sway_log(L_DEBUG, "Set %s transform to %d", oc->name, oc->transform); 131 wlr_log(L_DEBUG, "Set %s transform to %d", oc->name, oc->transform);
132 wlr_output_set_transform(wlr_output, oc->transform); 132 wlr_output_set_transform(wlr_output, oc->transform);
133 } 133 }
134 134
135 // Find position for it 135 // Find position for it
136 if (oc && (oc->x != -1 || oc->y != -1)) { 136 if (oc && (oc->x != -1 || oc->y != -1)) {
137 sway_log(L_DEBUG, "Set %s position to %d, %d", oc->name, oc->x, oc->y); 137 wlr_log(L_DEBUG, "Set %s position to %d, %d", oc->name, oc->x, oc->y);
138 wlr_output_layout_add(root_container.sway_root->output_layout, 138 wlr_output_layout_add(root_container.sway_root->output_layout,
139 wlr_output, oc->x, oc->y); 139 wlr_output, oc->x, oc->y);
140 } else { 140 } else {
@@ -165,7 +165,7 @@ void apply_output_config(struct output_config *oc, swayc_t *output) {
165 terminate_swaybg(output->bg_pid); 165 terminate_swaybg(output->bg_pid);
166 } 166 }
167 167
168 sway_log(L_DEBUG, "Setting background for output %d to %s", output_i, oc->background); 168 wlr_log(L_DEBUG, "Setting background for output %d to %s", output_i, oc->background);
169 169
170 size_t bufsize = 12; 170 size_t bufsize = 12;
171 char output_id[bufsize]; 171 char output_id[bufsize];
diff --git a/sway/config/seat.c b/sway/config/seat.c
index 113139e8..03cc6d4e 100644
--- a/sway/config/seat.c
+++ b/sway/config/seat.c
@@ -7,11 +7,11 @@
7struct seat_config *new_seat_config(const char* name) { 7struct seat_config *new_seat_config(const char* name) {
8 struct seat_config *seat = calloc(1, sizeof(struct seat_config)); 8 struct seat_config *seat = calloc(1, sizeof(struct seat_config));
9 if (!seat) { 9 if (!seat) {
10 sway_log(L_DEBUG, "Unable to allocate seat config"); 10 wlr_log(L_DEBUG, "Unable to allocate seat config");
11 return NULL; 11 return NULL;
12 } 12 }
13 13
14 sway_log(L_DEBUG, "new_seat_config(%s)", name); 14 wlr_log(L_DEBUG, "new_seat_config(%s)", name);
15 seat->name = strdup(name); 15 seat->name = strdup(name);
16 if (!sway_assert(seat->name, "could not allocate name for seat")) { 16 if (!sway_assert(seat->name, "could not allocate name for seat")) {
17 free(seat); 17 free(seat);
@@ -34,7 +34,7 @@ struct seat_attachment_config *seat_attachment_config_new() {
34 struct seat_attachment_config *attachment = 34 struct seat_attachment_config *attachment =
35 calloc(1, sizeof(struct seat_attachment_config)); 35 calloc(1, sizeof(struct seat_attachment_config));
36 if (!attachment) { 36 if (!attachment) {
37 sway_log(L_DEBUG, "cannot allocate attachment config"); 37 wlr_log(L_DEBUG, "cannot allocate attachment config");
38 return NULL; 38 return NULL;
39 } 39 }
40 return attachment; 40 return attachment;