Skip to content

Commit

Permalink
Fix x11 libraryimport
Browse files Browse the repository at this point in the history
Expose process name in the process picker
  • Loading branch information
FaithBeam committed Oct 19, 2024
1 parent 46b84ea commit a7aa703
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions YMouseButtonControl.Linux/Services/CurrentWindowServiceX11.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,22 @@ out var prop2

internal static partial class X11
{
[LibraryImport("libX11.so")]
[LibraryImport("libX11.so.6")]
internal static partial int XFree(nint data);

[LibraryImport("libX11.so")]
[LibraryImport("libX11.so.6")]
internal static partial nint XOpenDisplay(nint display);

[LibraryImport("libX11.so")]
[LibraryImport("libX11.so.6")]
internal static partial void XCloseDisplay(nint display);

[LibraryImport("libX11.so")]
[LibraryImport("libX11.so.6")]
internal static partial nint XDefaultRootWindow(nint display);

[LibraryImport("libX11.so")]
[LibraryImport("libX11.so.6")]
internal static partial nint XInternAtom(nint display, nint atomName, int onlyIfExists);

[LibraryImport("libX11.so")]
[LibraryImport("libX11.so.6")]
internal static partial int XGetWindowProperty(
IntPtr display,
IntPtr window,
Expand Down
3 changes: 1 addition & 2 deletions YMouseButtonControl.Linux/Services/ProcessMonitorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ public IEnumerable<ProcessModel> GetProcesses() =>
.Where(x =>
!string.IsNullOrWhiteSpace(x.Process.MainModule?.ModuleName)
&& !string.IsNullOrWhiteSpace(x.Process.ProcessName)
)
.DistinctBy(x => x.Process.MainModule?.FileName);
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="Process" Binding="{Binding Process.MainModule.ModuleName}" />
<DataGridTextColumn Header="ProcessName" Binding="{Binding Process.ProcessName}" />
<DataGridTextColumn Header="Window Title" Binding="{Binding Process.MainWindowTitle}" />
<DataGridTextColumn Header="File Name" Binding="{Binding Process.MainModule.FileName}" />
</DataGrid.Columns>
Expand Down

0 comments on commit a7aa703

Please sign in to comment.