1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-03-10 17:06:37 -04:00

Revert "[Window] Allow active window to be sorted on top."

This reverts commit 8542b3ee7e.
This commit is contained in:
Qball Cow 2025-01-26 20:13:21 +01:00
parent e068ddbc01
commit fb326c1b61
2 changed files with 0 additions and 48 deletions

View file

@ -683,19 +683,6 @@ configuration {
or pass `-window-hide-active-window true` on command line.
You can sort the currently active window to the top of the list with the
'sort-active-window-first' setting:
```css
configuration {
window {
sort-active-window-first: true;
}
}
```
or pass `-sort-active-window-first true` on command line.
You can prefer the icon theme above the window set icon with the
'prefer-icon-theme' setting:

View file

@ -26,8 +26,6 @@
*/
/** The log domain of this dialog. */
#include <X11/X.h>
#include <xcb/xproto.h>
#define G_LOG_DOMAIN "Modes.Window"
#include "config.h"
@ -698,25 +696,6 @@ static void _window_mode_load_data(Mode *sw, unsigned int cd) {
}
xcb_ewmh_get_windows_reply_wipe(&clients);
}
static gint _window_mode_sort(gconstpointer a, gconstpointer b, gpointer data) {
WindowModePrivateData *pd = (WindowModePrivateData *)data;
gint wa = *(const int *)a;
gint wb = *(const int *)b;
const client *ca = window_client(pd, wa);
const client *cb = window_client(pd, wb);
if (ca == NULL || cb == NULL) {
return 0;
}
if (ca->active) {
return -1;
}
if (cb->active) {
return 1;
}
return 0;
}
static int window_mode_init(Mode *sw) {
if (mode_get_private_data(sw) == NULL) {
@ -738,13 +717,6 @@ static int window_mode_init(Mode *sw) {
if (!window_matching_fields_parsed) {
window_mode_parse_fields();
}
// Sort active window first.
p = rofi_theme_find_property(wid, P_BOOLEAN, "sort-active-window-first",
FALSE);
if (p && p->type == P_BOOLEAN && p->value.b == TRUE) {
g_qsort_with_data(pd->ids->array, pd->ids->len, sizeof(xcb_window_t),
_window_mode_sort, pd);
}
}
return TRUE;
}
@ -764,13 +736,6 @@ static int window_mode_init_cd(Mode *sw) {
if (!window_matching_fields_parsed) {
window_mode_parse_fields();
}
// Sort active window first.
p = rofi_theme_find_property(wid, P_BOOLEAN, "sort-active-window-first",
FALSE);
if (p && p->type == P_BOOLEAN && p->value.b == TRUE) {
g_qsort_with_data(pd->ids->array, pd->ids->len, sizeof(xcb_window_t),
_window_mode_sort, pd);
}
}
return TRUE;
}