Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement get_process_owner() #39

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

jessp01
Copy link

@jessp01 jessp01 commented Feb 8, 2025

Returns the username who owns the process owning the current window.
This is done by getting the owner (UID) of `/proc/<pid>/comm` with `stat()`
and mapping it to a username with `getpwuid()`.

This is important if you operate in a multi-user ENV and wish to record the user who performed the action.

    Returns the username who owns the process owning the current window.
    This is done by getting the owner (UID) of `/proc/<pid>/comm` with `stat()`
    and mapping it to a username with `getpwuid()`.
- Copyright adjustments
functions) to the beginning of main (after arg parsing check but before
`gtk_init()`) to enable them to work even when an X display is not
available. This is useful for CI checks, amongst other things.
- In C, you can't declare variables directly under case labels - declaration needs to be inside a block.
GCC forgives it but Clang 17 and above does not. I've also corrected the
indentation

- Need to include <sys/types.h> to use uint type
…ess-owner

- In C, you can't declare variables directly under case labels - declaration needs to be inside a block.
GCC forgives it but Clang 17 and above does not. I've also corrected the indentation in some places.

- Need to include <sys/types.h> to use uint type

These changes allow devilspie2 to build with Clang 17 and 18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant